int fd; if ((fd=open("chemin",O_WRONLY))==-1) { fprintf(stderr,"ouverture impossible\n"); fprintf(stderr,"erreur %d\n",errno); perror(argv[0]); exit(1); }