1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <signal.h>
#include <sys/wait.h>
typedef struct scapteur {
pid_t num;
unsigned int total;
unsigned char termine;
} *Capteur;
Capteur nouv_capteur(void){
Capteur c = (Capteur)malloc(sizeof(struct scapteur));
c->num = getpid();
c->total = 0;
c->termine = 0;
return c;
}
int main(int argc, char **argv){
Capteur *capteurs;
Capteur c;
*capteurs = nouv_capteur();
return EXIT_SUCCESS;
} |
Partager