Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/dcrt0.cc2
-rw-r--r--winsup/cygwin/pinfo.cc3
2 files changed, 2 insertions, 3 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index fb726a739..86ab72564 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -652,7 +652,7 @@ void
child_info_spawn::handle_spawn ()
{
extern void fixup_lockf_after_exec (bool);
- HANDLE h;
+ HANDLE h = INVALID_HANDLE_VALUE;
if (!dynamically_loaded || get_parent_handle ())
{
cygheap_fixup_in_child (true);
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 123784e67..ffd4c8cd9 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -62,11 +62,10 @@ pinfo::thisproc (HANDLE h)
{
cygheap->pid = create_cygwin_pid ();
flags |= PID_NEW;
+ h = INVALID_HANDLE_VALUE;
}
/* spawnve'd process got pid in parent, cygheap->pid has been set in
child_info_spawn::handle_spawn. */
- else if (h == INVALID_HANDLE_VALUE)
- h = NULL;
init (cygheap->pid, flags, h);
procinfo->process_state |= PID_IN_USE;