Permalink
Fetching contributors…
Cannot retrieve contributors at this time
|
#include "apue.h" |
|
|
|
#define BUFFSIZE 4096 |
|
|
|
int |
|
main(void) |
|
{ |
|
int n; |
|
char buf[BUFFSIZE]; |
|
|
|
while ((n = read(STDIN_FILENO, buf, BUFFSIZE)) > 0) |
|
if (write(STDOUT_FILENO, buf, n) != n) |
|
err_sys("write error"); |
|
|
|
if (n < 0) |
|
err_sys("read error"); |
|
|
|
exit(0); |
|
} |
You can't perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.