Otherwise we remove the events from the epoll_fd before we exit in
the parent process.
This would be a bit awful if it were something we require all users of
libopenconnect to know about, but it isn't. We make everything O_CLOEXEC
and we don't expect users to be calling openconnect_vpninfo_free() from
another process after forking, like the background code does. We only
do it there so that we can check for memory leaks (I think).
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
_("Continuing in background; pid %d\n"),
pid);
sig_vpninfo = NULL;
+ /* Don't invoke EPOLL_CTL_DEL; it'll mess up the real one */
+ vpninfo->epoll_fd = -1;
openconnect_vpninfo_free(vpninfo);
exit(0);
}