mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-22 08:15:13 +00:00
Closes: #2354. - Process spawned for raw IO should be collected using wait(). Closing the specially created pipe early causes an exception in the child process when it tries to write to stderr the JSON result of executed method. Tests: - Monitor the output of 'journalctl -f'. Download and archive. Without the patch, an error is printed as described in the bug. With the but no such error is printed. Downloaded file is the same in both cases. - Writing a log message in cleanup_func shows that the process has been waited for and the FDs have been closed. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>