change OS name

This commit is contained in:
MAO Dongyang 2023-03-16 12:07:57 +01:00
parent c1a3e1601e
commit 3c4e3c952f
No known key found for this signature in database
7 changed files with 26 additions and 8 deletions

View File

@ -3,20 +3,31 @@
#include <sys/types.h>
#include <unistd.h>
int main() {
int main()
{
pid_t fpid;
fpid = fork();
// create child process
if (fpid < 0) {
printf("error in fork!");
} else if (fpid == 0) {
if (fpid == -1)
{
perror("perror in fork!");
exit(EXIT_FAILURE);
}
if (fpid == 0)
{
printf("I am the child process, my process id is %d\n", getpid());
sleep(10);
} else {
sleep(1);
printf("child process DONE\n");
exit(EXIT_SUCCESS);
}
else
{
printf("I am the parent process, my process id is %d\n", getpid());
wait(NULL);
// exit(0);
printf("parent process DONE\n");
exit(EXIT_SUCCESS);
}
return 0;
exit(EXIT_SUCCESS);
}

BIN
TP2/tableau/bubbleSort.o Executable file

Binary file not shown.

BIN
TP2/tableau/quickSort.o Executable file

Binary file not shown.

BIN
TP3/List/a.out Executable file

Binary file not shown.

7
langage_C.code-workspace Normal file
View File

@ -0,0 +1,7 @@
{
"folders": [
{
"path": "."
}
]
}