diff options
author | Christopher Faylor <me@cgf.cx> | 2002-09-22 03:38:57 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-09-22 03:38:57 +0000 |
commit | c90e1cf179187d5d188a3003db503ffd86d80cfe (patch) | |
tree | ad0890e2267f00de92aefc5a99d60017e4f15fe9 /winsup/cygwin/fork.cc | |
parent | 228f6b6e07f1b08620dc08f389263f228da0079f (diff) | |
download | cygnal-c90e1cf179187d5d188a3003db503ffd86d80cfe.tar.gz cygnal-c90e1cf179187d5d188a3003db503ffd86d80cfe.tar.bz2 cygnal-c90e1cf179187d5d188a3003db503ffd86d80cfe.zip |
* fhandler.cc (fhandler_base::dup): Don't set handle on failure. Caller has
already taken care of that.
* fhandler_console.cc (fhandler_console::open): Initialize handles to NULL.
(fhandler_console::close): Ditto. GNUify non-GNU formatted functions calls
throughout.
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r-- | winsup/cygwin/fork.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 673d0d0ef..daca12109 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -194,7 +194,7 @@ resume_child (PROCESS_INFORMATION &pi, HANDLE forker_finished) Note that this has to be a macro since the parent may be messing with our stack. */ static void __stdcall -sync_with_parent(const char *s, bool hang_self) +sync_with_parent (const char *s, bool hang_self) { debug_printf ("signalling parent: %s", s); /* Tell our parent we're waiting. */ @@ -258,7 +258,7 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls) if (GetEnvironmentVariable ("CYGWIN_FORK_SLEEP", buf, sizeof (buf))) { small_printf ("Sleeping %d after fork, pid %u\n", atoi (buf), GetCurrentProcessId ()); - Sleep (atoi(buf)); + Sleep (atoi (buf)); } #endif @@ -426,7 +426,7 @@ fork_parent (HANDLE& hParent, dll *&first_dll, si.cb = sizeof (STARTUPINFO); si.lpReserved2 = (LPBYTE)&ch; - si.cbReserved2 = sizeof(ch); + si.cbReserved2 = sizeof (ch); /* Remove impersonation */ if (cygheap->user.issetuid ()) @@ -475,8 +475,8 @@ fork_parent (HANDLE& hParent, dll *&first_dll, { __seterrno (); syscall_printf ("CreateProcessA failed, %E"); - ForceCloseHandle(subproc_ready); - ForceCloseHandle(forker_finished); + ForceCloseHandle (subproc_ready); + ForceCloseHandle (forker_finished); /* Restore impersonation */ if (cygheap->user.issetuid ()) ImpersonateLoggedOnUser (cygheap->user.token); @@ -503,7 +503,7 @@ fork_parent (HANDLE& hParent, dll *&first_dll, /* Initialize things that are done later in dll_crt0_1 that aren't done for the forkee. */ - strcpy(forked->progname, myself->progname); + strcpy (forked->progname, myself->progname); /* Restore impersonation */ if (cygheap->user.issetuid ()) @@ -517,7 +517,7 @@ fork_parent (HANDLE& hParent, dll *&first_dll, /* Fill in fields in the child's process table entry. */ forked->hProcess = pi.hProcess; forked->dwProcessId = pi.dwProcessId; - forked->copysigs(myself); + forked->copysigs (myself); /* Hopefully, this will succeed. The alternative to doing things this way is to reserve space prior to calling CreateProcess and then fill |