SCR/SCR3.1/TP3/session.c
2023-09-21 20:18:32 +02:00

19 lines
244 B
C

#include <stdio.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
if (fork()){
printf("session = %d\n",getsid(getpid()));
while(1);
} else {
setsid();
printf("session = %d\n",getsid(getpid()));
while(1);
}
return 0;
}