2 Copyright © 1995-2002, 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 ******************************************************************************/
45 if(__get_arosc_privdata()->acpd_flags
& PRETEND_CHILD
)
47 struct vfork_data
*udata
= __get_arosc_privdata()->acpd_vfork_data
;
48 et
= GetETask(udata
->child
);
51 et
= GetETask(FindTask(NULL
));
53 return (pid_t
) et
->et_UniqueID
;