From 03035efd1d81688d0553235e83ca65885809822f Mon Sep 17 00:00:00 2001 From: muarachmann Date: Thu, 11 Oct 2018 04:35:15 +0100 Subject: [PATCH] Gets process id of program running --- code/process.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 code/process.c diff --git a/code/process.c b/code/process.c new file mode 100755 index 0000000..fdebaa0 --- /dev/null +++ b/code/process.c @@ -0,0 +1,20 @@ +#include +#include +#include +#include +#include +#include + + int main(){ + + pid_t getpid(void); + pid_t getppid(void); + + printf("PID = [%d]\n",getpid()); + printf("PPID = [%d]\n",getppid()); + + + + + return 0; + }