[comp.os.minix] POSIX getppid

tholm@uvicctr.UUCP (Terrence W. Holm) (07/08/88)

EFTH Minix report #23  - July 1988 -  POSIX getppid(2)


This is an implementation of getppid(2) - "get parent's
process id". Please consider this a public domain program.

A "man" page is included in EFTH report #25.


--------------------------------------------------------------------
#include "lib.h"

PUBLIC int getppid()
{
  int p = callm1(MM, GETPID, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);

  if ( p < 0 ) return ( p );

  return( M.m2_i1 );
}
--------------------------------------------------------------------
               Edwin L. Froese
                  uw-beaver!ubc-cs!mprg!handel!froese

               Terrence W. Holm
                  uw-beaver!ubc-cs!uvicctr!sirius!tholm