2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
5 POSIX function getpid().
8 #include <proto/exec.h>
12 #include "__arosc_privdata.h"
14 /*****************************************************************************
17 #include <sys/types.h>
26 Returns the process ID of the calling process
29 The process ID of the calling process.
41 ******************************************************************************/
43 struct aroscbase
*aroscbase
= __GM_GetBase();
46 if(aroscbase
->acb_flags
& PRETEND_CHILD
)
48 struct vfork_data
*udata
= aroscbase
->acb_vfork_data
;
49 et
= GetETask(udata
->child
);
52 et
= GetETask(FindTask(NULL
));
54 return (pid_t
) et
->et_UniqueID
;