]> sourceware.org Git - newlib-cygwin.git/commit
fork: remove cygpid.N sharedmem on fork failure
authorMichael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
Tue, 5 Jun 2018 10:40:21 +0000 (12:40 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Tue, 5 Feb 2019 09:20:16 +0000 (10:20 +0100)
commitfb3e8bd88b06be6b5e748b99aa50968bb46653a1
treeaae03c2c18bcc5df877561bcbb3d415db798122f
parent99cd3df6ec471d6cbdea62fb14ebbe1e5eec8ef8
fork: remove cygpid.N sharedmem on fork failure

When fork finally fails although both CreateProcess and creating the
"cygpid.N" shared memory section succeeded, we have to release that
shared memory section as well - before releasing the process handle.
Otherways we leave an orphan "cygpid.N" shared memory section, and any
subsequent cygwin process receiving the same PID fails to initialize.

* fork.cc (frok::parent): Call child.allow_remove in cleanup code.
winsup/cygwin/fork.cc
This page took 0.030371 seconds and 5 git commands to generate.