summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-11-13 07:50:20 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-11-13 07:50:20 +0000
commit90ff4f01abc702b1f3376682bbaf8f4a8f6d2690 (patch)
tree98cc133f4bc5aad7d66e8c1b204eb93806414f84 /win32/win32.c
parentbeeda6eef09b19f0775df8859757e7b75b310b9d (diff)
* win32/win32.c (mypopen): return error status instead of calling
rb_sys_fail(). * win32/win32.c (do_spawn): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 99a703c6b5..d0531a70d0 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -474,7 +474,7 @@ mypopen (char *cmd, char *mode)
fRet = CreatePipe(&hInFile, &hOutFile, &sa, 2048L);
if (!fRet) {
errno = GetLastError();
- rb_sys_fail("mypopen: CreatePipe");
+ return NULL;
}
if (reading) {
@@ -487,7 +487,7 @@ mypopen (char *cmd, char *mode)
if (!child) {
CloseHandle(hInFile);
CloseHandle(hOutFile);
- rb_sys_fail("mypopen: CreateChild");
+ return NULL;
}
if (reading) {
@@ -502,13 +502,13 @@ mypopen (char *cmd, char *mode)
if (fd == -1) {
CloseHandle(reading ? hInFile : hOutFile);
CloseChildHandle(child);
- rb_sys_fail("mypopen: _open_osfhandle");
+ return NULL;
}
if ((fp = (FILE *) fdopen(fd, mode)) == NULL) {
_close(fd);
CloseChildHandle(child);
- rb_sys_fail("mypopen: fdopen");
+ return NULL;
}
child->pipe = fp;
@@ -551,7 +551,7 @@ char *cmd;
{
struct ChildRecord *child = CreateChild(cmd, NULL, NULL, NULL, NULL);
if (!child) {
- rb_sys_fail("do_spawn: CreateChild");
+ return -1;
}
rb_syswait(child->pid);
return NUM2INT(rb_last_status);