Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_posix/sys/lib/dist/cmd/tailfsrv.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <u.h>
2
#include <libc.h>
3
 
4
void
5
main(void)
6
{
7
	int fd, p[2];
8
	char buf[8192], n;
9
 
10
	pipe(p);
11
	fd = create("/srv/log", OWRITE, 0666);
12
	fprint(fd, "%d", p[0]);
13
	close(fd);
14
	close(p[0]);
15
	while((n = read(p[1], buf, sizeof buf)) >= 0)
16
		write(1, buf, n);
17
}