"debut TD0"
This commit is contained in:
23
2019-2020/S3T_TP_03_PROCESSUS-2-PROG/Demonstrations/p_fichier.c
Executable file
23
2019-2020/S3T_TP_03_PROCESSUS-2-PROG/Demonstrations/p_fichier.c
Executable file
@@ -0,0 +1,23 @@
|
||||
/*******************************************************/
|
||||
/* p_fichier: Ce programme cr<63>e un nouveau */
|
||||
/* processus avec fork */
|
||||
/* - Le processus pere ouvre un nouveau fichier en */
|
||||
/* cr<63>ation de nom donn<6E> en argument */
|
||||
/* - Le processus fils <20>crit une chaine donnee en */
|
||||
/* argument dans le fichier puis meurt */
|
||||
/* - Le processus pere affiche le fichier puis meurt */
|
||||
/* */
|
||||
/* syntaxe : p_fichier fichier chaine */
|
||||
/*******************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int main (int argc, char* argv[]) {
|
||||
|
||||
if (argc != 3) fprintf (stderr, "\nSyntaxe: %s <fichier> <chaine>\n\n", argv[0]);
|
||||
|
||||
/**********************/
|
||||
/* PARTIE A COMPLETER */
|
||||
/**********************/
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user