From 496371638e73b962e594acecb976c0dbb70d0ad3 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 4 Apr 2007 01:17:34 +0000 Subject: * 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 --- io.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'io.c') 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 */ -- cgit v1.2.3