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:
authorChristopher Faylor <me@cgf.cx>2002-09-19 19:12:48 +0400
committerChristopher Faylor <me@cgf.cx>2002-09-19 19:12:48 +0400
commit580e99a151bdeea4141a0bf03f1e57f07d288ee7 (patch)
treeaafb0b3d24468b3f08c848b6c018c261267aca30 /winsup/cygwin/fork.cc
parent776044d5540355f809ee758580a3235d38084b12 (diff)
Cleanup calls to CreateFile throughout.
* dcrt0.cc (__api_fatal): Correctly check for failing return from CreateFile. * assert.cc (__assert): Don't check return value from CreateFile for NULL. * fhandler_console.cc (set_console_state_for_spawn): Ditto. * fork.cc (fork_parent): Ditto.
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r--winsup/cygwin/fork.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index dab9aced0..673d0d0ef 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -362,12 +362,12 @@ fork_parent (HANDLE& hParent, dll *&first_dll,
/* If we don't have a console, then don't create a console for the
child either. */
- HANDLE console_handle = CreateFileA ("CONOUT$", GENERIC_WRITE,
- FILE_SHARE_WRITE, &sec_none_nih,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,
- NULL);
+ HANDLE console_handle = CreateFile ("CONOUT$", GENERIC_WRITE,
+ FILE_SHARE_WRITE, &sec_none_nih,
+ OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,
+ NULL);
- if (console_handle != INVALID_HANDLE_VALUE && console_handle != 0)
+ if (console_handle != INVALID_HANDLE_VALUE)
CloseHandle (console_handle);
else
c_flags |= DETACHED_PROCESS;