Browse Source

libposix: getppid

Giacomo Tesio 7 years ago
parent
commit
c2204d83a5
2 changed files with 7 additions and 0 deletions
  1. 1 0
      sys/include/posix.h
  2. 6 0
      sys/src/lib/posix/processes.c

+ 1 - 0
sys/include/posix.h

@@ -40,6 +40,7 @@ extern int POSIX_execve(int *errnop, const char *name, char * const*argv, char *
 extern int POSIX_fork(int *errnop);
 extern int POSIX_fstat(int *errnop, int file, void *stat);
 extern int POSIX_getpid(int *errnop);
+extern int POSIX_getppid(int *errnop);
 extern int POSIX_isatty(int *errnop, int file);
 extern int POSIX_kill(int *errnop, int pid, int sig);
 extern int POSIX_link(int *errnop, const char *old, const char *new);

+ 6 - 0
sys/src/lib/posix/processes.c

@@ -158,6 +158,12 @@ POSIX_getpid(int *errnop)
 	return getpid();
 }
 
+int
+POSIX_getppid(int *errnop)
+{
+	return getppid();
+}
+
 int
 POSIX_fork(int *errnop)
 {