This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues/pull-requests.
2016-05-27 17:00:02 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2018-11-02 21:03:54 +01:00
|
|
|
int32_t main(int32_t argc, char * argv[])
|
2016-05-27 17:00:02 +02:00
|
|
|
{
|
2016-09-15 23:08:08 +02:00
|
|
|
(void) argc;
|
|
|
|
(void) argv;
|
2016-05-27 17:00:02 +02:00
|
|
|
|
|
|
|
char *fifopathin = "/tmp/123000-1-in";
|
|
|
|
size_t msize;
|
|
|
|
|
|
|
|
FILE *out = fopen (fifopathin, "wb");
|
|
|
|
|
|
|
|
printf ("opened\n");
|
|
|
|
|
|
|
|
char *buf = "coucou";
|
|
|
|
printf ("write %s\n", buf);
|
|
|
|
|
|
|
|
if ((msize = fread (buf, 6, 1, out))) {
|
|
|
|
printf ("error read %ld\n", msize);
|
|
|
|
return EXIT_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
sleep (10);
|
|
|
|
printf ("write end\n");
|
|
|
|
|
|
|
|
fclose (out);
|
|
|
|
|
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}
|