#include <stdio.h>
#include <sys/types.h>
int main(void)
{
printf("Hello world from procese ID %ld\n",(long)getpid());
return 0;
}
函数getpid:
pid_t getpid(void); // 返回当前进程ID
#include <stdio.h>
#include <sys/types.h>
int main(void)
{
printf("Hello world from procese ID %ld\n",(long)getpid());
return 0;
}
函数getpid:
pid_t getpid(void); // 返回当前进程ID