2020-05-02 00:01:44 +02:00
|
|
|
/*
|
|
|
|
gcc processus_1.c
|
|
|
|
Exemple : ./a.out un deux trois
|
|
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2020-09-04 11:09:08 +02:00
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2020-05-02 00:01:44 +02:00
|
|
|
int i;
|
2020-09-04 11:09:08 +02:00
|
|
|
for (i = 1; i < argc; i++)
|
|
|
|
{
|
|
|
|
printf("argument %d: %s\n", i, argv[i]);
|
2020-05-02 00:01:44 +02:00
|
|
|
}
|
2020-09-04 11:09:08 +02:00
|
|
|
printf("\nPID = %d - PPID = %d \n\n", getpid(), getppid());
|
|
|
|
|
|
|
|
//sleep(60);
|
|
|
|
return 0;
|
2020-05-02 00:01:44 +02:00
|
|
|
}
|