BRUTE AE: 04make-c: Test: Run forkpipe
I've got an only Issue "ERROR #1 (closed): No write to stdout before sleep. Perhaps you should use 'setbuf(stdout, NULL)' or 'fflush(stdout)'." I've tried different things, and now I'm at flushing the stdout right after sleep. Part of my code:
sleep(5);
fflush(stdout);
kill(fork_GEN, SIGTERM);
It is essential to note that this error is raised at every calculation of nsd. So every time the programme writes the result to stdout it raises this error. Here is an example to provide at what order stdout and stderr are accessed:
❯ ./forkpipe
GEN TERMINATED
nsd(1835, 3493) = 1
nsd(2085, 2483) = 1
nsd(1940, 1858) = 2
nsd(3397, 1068) = 1
nsd(3510, 2059) = 1
NSD DONE
OK
Keep this URL here: https://cw.felk.cvut.cz/brute/data/ae/release/2023z_b4b35osy/04make-c/cviceni/ae/results/results.php?&idg=zlochvla&idu=10547&upload=1577485&result=1135993#test-7