summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index a051ffad38..546ec45d18 100644
--- a/io.c
+++ b/io.c
@@ -1001,7 +1001,7 @@ pipe_open(pname, mode)
break;
default: /* parent */
- if (pid > 0) rb_sys_fail(0);
+ if (pid < 0) rb_sys_fail(pname);
else {
NEWOBJ(port, struct RFile);
OBJSETUP(port, cIO, T_FILE);