diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-08 08:38:59 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-08 08:38:59 +0000 |
commit | 03856ff2f74c1d1208f80d0a06cdc107057a6ecb (patch) | |
tree | 0fe04c40d7f633b09b7773b5c3ff735187e6bcf6 | |
parent | 57ec61eaeb705c48a115a367b89158e7c50cd36b (diff) | |
download | ruby-03856ff2f74c1d1208f80d0a06cdc107057a6ecb.tar.gz ruby-03856ff2f74c1d1208f80d0a06cdc107057a6ecb.tar.xz ruby-03856ff2f74c1d1208f80d0a06cdc107057a6ecb.zip |
* win32/win32.c (rb_w32_pipe_exec): need to close original socket
handle.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | win32/win32.c | 4 |
2 files changed, 6 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Wed Dec 8 17:37:33 2004 NAKAMURA Usaku <usa@ruby-lang.org> + + * win32/win32.c (rb_w32_pipe_exec): need to close original socket + handle. + Wed Dec 8 14:31:36 2004 Yukihiro Matsumoto <matz@ruby-lang.org> * sprintf.c (rb_f_sprintf): [ruby-dev:25104] diff --git a/win32/win32.c b/win32/win32.c index 4cb1d45dc..5dafc0320 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -780,14 +780,12 @@ rb_w32_pipe_exec(const char *cmd, const char *prog, int mode, int *pipe) /* associate handle to file descritor */ *pipe = rb_w32_open_osfhandle((long)hDupFile, pipemode); + CloseHandle(hOrg); if (*pipe == -1) { - CloseHandle(hOrg); CloseHandle(hDupFile); CloseChildHandle(child); break; } - if (!(reading && writing)) - CloseHandle(hOrg); ret = child->pid; } while (0)); |