#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
int main(int argc,char *argv[]) {
if (argc!=2) { exit(1); }
int d1 = open(argv[1], O_WRONLY);
if (d1==-1) { perror("ouverture t1"); exit(1); }
printf("ouverture t1 ok\n");
char c = 'a';
for (int i=0; i<10; i++,c++) {
write(d1,&c,1);
sleep(1);
}
close(d1);
}