1 /* $Id: getppid.c,v 1.2 2002/02/20 09:17:58 hyperion Exp $
4 * COPYRIGHT: See COPYING in the top level directory
5 * PROJECT: ReactOS POSIX+ Subsystem
6 * FILE: subsys/psx/lib/psxdll/unistd/getppid.c
7 * PURPOSE: Get the parent process ID
8 * PROGRAMMER: KJK::Hyperion <noog@libero.it>
13 #include <ddk/ntddk.h>
14 #include <sys/types.h>
16 #include <psx/errno.h>
20 PROCESS_BASIC_INFORMATION pbiInfo
;
23 nErrCode
= NtQueryInformationProcess
26 ProcessBasicInformation
,
32 if(!NT_SUCCESS(nErrCode
))
34 errno
= __status_to_errno(nErrCode
);
38 return (pbiInfo
.InheritedFromUniqueProcessId
);