"debut TD0"
This commit is contained in:
22
2019-2020/S3T_TP_07_THREADS/Demonstrations/demo_system.c
Normal file
22
2019-2020/S3T_TP_07_THREADS/Demonstrations/demo_system.c
Normal file
@@ -0,0 +1,22 @@
|
||||
///********************************************************************/
|
||||
///* IUT NICE-COTE D'AZUR - Departement INFORMATIQUE - R. CHIGNOLI */
|
||||
///* Module DUT M311 Theme PTHREADS */
|
||||
///********************************************************************/
|
||||
/// demo_system : Demonstration d'utilisation de "system"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
#include <pthread.h>
|
||||
|
||||
int main (int argc, char* argv[]) {
|
||||
int i;
|
||||
assert (argc == 2);
|
||||
for (i=1; i<=3; i++) { /// 3 : par exemple ...
|
||||
system (argv[1]);
|
||||
printf (" ... Au suivant ...\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user