diff options
author | Christopher Faylor <me@cgf.cx> | 2002-09-19 15:12:48 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-09-19 15:12:48 +0000 |
commit | 580e99a151bdeea4141a0bf03f1e57f07d288ee7 (patch) | |
tree | aafb0b3d24468b3f08c848b6c018c261267aca30 /winsup/cygwin/spawn.cc | |
parent | 776044d5540355f809ee758580a3235d38084b12 (diff) | |
download | cygnal-580e99a151bdeea4141a0bf03f1e57f07d288ee7.tar.gz cygnal-580e99a151bdeea4141a0bf03f1e57f07d288ee7.tar.bz2 cygnal-580e99a151bdeea4141a0bf03f1e57f07d288ee7.zip |
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/spawn.cc')
-rw-r--r-- | winsup/cygwin/spawn.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 8c1c18adb..193f593bc 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -420,13 +420,10 @@ spawn_guts (const char * prog_arg, const char *const *argv, that it is NOT a script file */ while (*ext == '\0') { - HANDLE hnd = CreateFileA (real_path, - GENERIC_READ, - FILE_SHARE_READ | FILE_SHARE_WRITE, - &sec_none_nih, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, - 0); + HANDLE hnd = CreateFile (real_path, GENERIC_READ, + FILE_SHARE_READ | FILE_SHARE_WRITE, + &sec_none_nih, OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, 0); if (hnd == INVALID_HANDLE_VALUE) { __seterrno (); |