]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Clean up the pipe closing in openvpn_popen()
authorDavid Sommerseth <davids@redhat.com>
Fri, 5 Sep 2014 15:04:58 +0000 (17:04 +0200)
committerDavid Sommerseth <davids@redhat.com>
Wed, 10 Sep 2014 09:56:18 +0000 (11:56 +0200)
commitdf8ebb21ad1957ec013ab832a0f6c18e9d6744f6
tree53e1734cd82ac1f061d6fa0fedd1550b27309a09
parent55480682b9bfa5894402954f4c740954d8c5c556
Clean up the pipe closing in openvpn_popen()

Do the proper closing of the pipe ends which is not being used,
also in error situations.  Moved the closing of the parent side
before the waitpid(), to be consistent with the child side (as
early as possible).

Also improved the error messages with more details.

[v2 - Don't call close() if execve() fails]

Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: 20140909202408.GK1118@greenie.muc.de
URL: http://article.gmane.org/gmane.network.openvpn.devel/9036
src/openvpn/misc.c