Cygwin: fork: restrict parent handle perms and drop handle after use

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2019-01-27 13:15:15 +01:00
parent 0fb497165f
commit 69cc7a0686
3 changed files with 7 additions and 3 deletions

View File

@ -203,6 +203,8 @@ frok::child (volatile char * volatile here)
rd_proc_pipe that would be an invalid handle. In the case of
wr_proc_pipe it would be == my_wr_proc_pipe. Both would be bad. */
ch.rd_proc_pipe = ch.wr_proc_pipe = NULL;
CloseHandle (hParent);
hParent = NULL;
cygwin_finished_initializing = true;
return 0;
}