2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
5 POSIX.1-2008 function getpid().
8 #include <proto/exec.h>
12 #include "__posixc_intbase.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 PosixCIntBase
*PosixCBase
=
44 (struct PosixCIntBase
*)__aros_getbase_PosixCBase();
47 if(PosixCBase
->flags
& PRETEND_CHILD
)
49 struct vfork_data
*udata
= PosixCBase
->vfork_data
;
50 et
= GetETask(udata
->child
);
53 et
= GetETask(FindTask(NULL
));
55 return (pid_t
) et
->et_UniqueID
;