summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-04-04 01:17:34 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-04-04 01:17:34 +0000
commit496371638e73b962e594acecb976c0dbb70d0ad3 (patch)
tree9ce83dfae7ffdd985db33615a7dfc618734ef7c2 /io.c
parentf7ba3c3de30d60327c7f862c2227693a642c66bf (diff)
* io.c (pipe_open): raise NotImplementedError for command "-" on
platforms where fork(2) is not available. [ruby-dev:30681] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/io.c b/io.c
index fe24def3c7..69df268226 100644
--- a/io.c
+++ b/io.c
@@ -3031,6 +3031,7 @@ pipe_open(pstr, pname, mode)
FILE *f;
if (!pname) pname = StringValueCStr(pstr);
+ if (strcmp("-", pname) == 0) rb_notimplement();
f = popen(pname, mode);
if (!f) rb_sys_fail(pname);
@@ -3056,6 +3057,7 @@ pipe_open(pstr, pname, mode)
FILE *fpr, *fpw;
if (!pname) pname = StringValueCStr(pstr);
+ if (strcmp("-", pname) == 0) rb_notimplement();
retry:
pid = pipe_exec(pname, rb_io_mode_modenum(mode), &fpr, &fpw);
if (pid == -1) { /* exec failed */