This commit is contained in:
2025-09-17 18:16:25 +02:00
parent 2856612f9d
commit e30e2a51e4
7 changed files with 286 additions and 0 deletions

18
tp/tp3/src/session.c Normal file
View File

@@ -0,0 +1,18 @@
#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;
}