Set close-on-exec flag for signal pipe

This commit is contained in:
Daniel P. Berrange 2008-02-20 15:47:06 +00:00
parent e266ded2f6
commit 049ff4e572
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,7 @@
Wed Feb 20 10:42:27 EST 2008 Daniel P. Berrange <berrange@redhat.com>
* qemud/qemud.c: Set close-on-exec flag for signal pipe
Wed Feb 20 10:39:27 EST 2008 Daniel P. Berrange <berrange@redhat.com> Wed Feb 20 10:39:27 EST 2008 Daniel P. Berrange <berrange@redhat.com>
* configure.in: Added checks for LVM tools * configure.in: Added checks for LVM tools

View File

@ -2089,7 +2089,9 @@ int main(int argc, char **argv) {
if (pipe(sigpipe) < 0 || if (pipe(sigpipe) < 0 ||
qemudSetNonBlock(sigpipe[0]) < 0 || qemudSetNonBlock(sigpipe[0]) < 0 ||
qemudSetNonBlock(sigpipe[1]) < 0) { qemudSetNonBlock(sigpipe[1]) < 0 ||
qemudSetCloseExec(sigpipe[0]) < 0 ||
qemudSetCloseExec(sigpipe[1]) < 0) {
qemudLog(QEMUD_ERR, _("Failed to create pipe: %s"), qemudLog(QEMUD_ERR, _("Failed to create pipe: %s"),
strerror(errno)); strerror(errno));
goto error1; goto error1;