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/src/libc/9sys/getppid.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
int
5
getppid(void)
6
{
7
	char b[20];
8
	int f;
9
 
10
	memset(b, 0, sizeof(b));
11
	f = open("/dev/ppid", 0);
12
	if(f >= 0) {
13
		read(f, b, sizeof(b));
14
		close(f);
15
	}
16
	return atol(b);
17
}