mirror of
https://github.com/c0de-archive/hacktoberfest-2018.git
synced 2024-12-22 05:12:40 +00:00
Gets process id of program running
This commit is contained in:
parent
77c79dfef2
commit
03035efd1d
20
code/process.c
Executable file
20
code/process.c
Executable file
@ -0,0 +1,20 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(){
|
||||
|
||||
pid_t getpid(void);
|
||||
pid_t getppid(void);
|
||||
|
||||
printf("PID = [%d]\n",getpid());
|
||||
printf("PPID = [%d]\n",getppid());
|
||||
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user