freebsd-dev/usr.sbin/uefisign
Eric van Gyzen 9e6158d274 uefisign: fix handling of errors from child proc
Close the unused pipe file descriptors so the parent will notice if
the child exits prematurely.  Previously, the parent would block
forever on a read from the pipe.

    $ uefisign -c foo.cert -k foo.key -o loader.efi loader.efi.unsigned
    uefisign: section points inside the headers
    load: 0.06  cmd: uefisign 4502 [piperd] 7.25r 0.00u 0.00s 0% 5968k
    ... _sleep+0x1be pipe_read+0x3d6 kern_readv+0x8c sys_read+0x83 ...

Reviewed by:	trasz
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D29605
2021-04-06 12:13:59 -05:00
..
child.c Drop "All rights reserved" from all my stuff. This includes 2020-10-28 13:46:11 +00:00
magic.h Drop "All rights reserved" from all my stuff. This includes 2020-10-28 13:46:11 +00:00
Makefile Stop hardcoding WARNS in uefisign(8). 2020-04-01 15:10:26 +00:00
Makefile.depend
pe.c Drop "All rights reserved" from all my stuff. This includes 2020-10-28 13:46:11 +00:00
uefisign.8 Drop "All rights reserved" from all my stuff. This includes 2020-10-28 13:46:11 +00:00
uefisign.c uefisign: fix handling of errors from child proc 2021-04-06 12:13:59 -05:00
uefisign.h Drop "All rights reserved" from all my stuff. This includes 2020-10-28 13:46:11 +00:00