4 ms·
The problem is that they can't handle normal piping well and we don't want the extraneous output in our logs & tests.
by tekknolagi 9y ago
The problem is that they can't handle normal piping well and we don't want the extraneous output in our logs & tests.
- repsilat 9y agoHmm, I don't quite understand, sorry. As far as I can tell, the code in TFA takes the pipe output up to one second and then kills the student code if it hasn't exited by itself. That's what my examples do too. (Happy to be corrected on either point.) Another solution: give students some simple test cases and the test environment.
- kd5bjo 9y agoThe article's code leaves the input stream open, which causes reads to block forever instead of exiting with an end-of-file marker. As the student projects are for an introductory course, making them handle that particular detail would only be a distraction from the desired learning outcomes.
- tekknolagi 9y agoPrecisely!