Skip to content
Snippets Groups Projects
Commit 45546993 authored by Attila Szollosi's avatar Attila Szollosi
Browse files

Exit if file doesn't exist

parent 17a7a7c0
No related branches found
No related tags found
No related merge requests found
......@@ -92,14 +92,16 @@ int main()
sleep(4);
orsin = fopen("/sbin/orsin", "w");
if ((orsin = fopen("/sbin/orsin", "w")) == NULL)
return 1;
fputs("set tw_backup_system_size 999", orsin);
fclose(orsin);
// Have to read FIFO file, because it blocks
// the thread processing the command
// (see man 3 mkfifo)
orsout = fopen("/sbin/orsout", "r");
if ((orsout = fopen("/sbin/orsout", "r")) == NULL)
return 1;
fgets(buf, 256, orsout);
fclose(orsout);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment