system: sysupgrade: close input side of pipe before reading
authorDustin Lundquist <d.lundquist@temperednetworks.com>
Mon, 28 Oct 2019 16:52:06 +0000 (16:52 +0000)
committerRafał Miłecki <rafal@milecki.pl>
Mon, 4 Nov 2019 10:49:30 +0000 (11:49 +0100)
commit3aa051b44177fc1403acab295f9f833451c4b9f0
tree765154898151fdada3c0fa04a9f51d2c5bc9a249
parentf47622e89c4d681a6441a3e51c0369f2baaaa1e6
system: sysupgrade: close input side of pipe before reading

When /usr/libexec/validate_firmware_image is not present on the system
procd will hang indefinitely on the read() since the input side of the
pipe is still open.

Also fix pipe file descriptor leak when fork() fails.

Signed-off-by: Dustin Lundquist <d.lundquist@temperednetworks.com>
Acked-by: Rafał Miłecki <rafal@milecki.pl>
system.c