summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-27 01:50:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-27 01:50:27 +0000
commit80429eed638c36baa3574704b1b567aa7acb4fa6 (patch)
tree387905f8803dc1cbf07736ac403351c38caeaeeb /io.c
parent2c3cc479a9b7d55e48d50d3c1712f28855faea12 (diff)
* io.c, process.c, time.c, ext: use rb_sys_fail_str instead of
rb_sys_fail. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/io.c b/io.c
index e7116cd824..ab1e6e1e1c 100644
--- a/io.c
+++ b/io.c
@@ -5454,13 +5454,13 @@ pipe_open(struct rb_exec_arg *eargp, VALUE prog, const char *modestr, int fmode,
switch (fmode & (FMODE_READABLE|FMODE_WRITABLE)) {
case FMODE_READABLE|FMODE_WRITABLE:
if (rb_pipe(arg.write_pair) < 0)
- rb_sys_fail(cmd);
+ rb_sys_fail_str(prog);
if (rb_pipe(arg.pair) < 0) {
int e = errno;
close(arg.write_pair[0]);
close(arg.write_pair[1]);
errno = e;
- rb_sys_fail(cmd);
+ rb_sys_fail_str(prog);
}
if (eargp) {
rb_exec_arg_addopt(eargp, INT2FIX(0), INT2FIX(arg.write_pair[0]));
@@ -5469,18 +5469,18 @@ pipe_open(struct rb_exec_arg *eargp, VALUE prog, const char *modestr, int fmode,
break;
case FMODE_READABLE:
if (rb_pipe(arg.pair) < 0)
- rb_sys_fail(cmd);
+ rb_sys_fail_str(prog);
if (eargp)
rb_exec_arg_addopt(eargp, INT2FIX(1), INT2FIX(arg.pair[1]));
break;
case FMODE_WRITABLE:
if (rb_pipe(arg.pair) < 0)
- rb_sys_fail(cmd);
+ rb_sys_fail_str(prog);
if (eargp)
rb_exec_arg_addopt(eargp, INT2FIX(0), INT2FIX(arg.pair[0]));
break;
default:
- rb_sys_fail(cmd);
+ rb_sys_fail_str(prog);
}
if (eargp) {
rb_exec_arg_fixup(arg.execp);
@@ -5509,7 +5509,7 @@ pipe_open(struct rb_exec_arg *eargp, VALUE prog, const char *modestr, int fmode,
errno = e;
if (errmsg[0])
rb_sys_fail(errmsg);
- rb_sys_fail(cmd);
+ rb_sys_fail_str(prog);
}
if ((fmode & FMODE_READABLE) && (fmode & FMODE_WRITABLE)) {
close(arg.pair[1]);
@@ -5542,13 +5542,13 @@ pipe_open(struct rb_exec_arg *eargp, VALUE prog, const char *modestr, int fmode,
switch (fmode & (FMODE_READABLE|FMODE_WRITABLE)) {
case FMODE_READABLE|FMODE_WRITABLE:
if (rb_pipe(write_pair) < 0)
- rb_sys_fail(cmd);
+ rb_sys_fail_str(prog);
if (rb_pipe(pair) < 0) {
int e = errno;
close(write_pair[0]);
close(write_pair[1]);
errno = e;
- rb_sys_fail(cmd);
+ rb_sys_fail_str(prog);
}
if (eargp) {
rb_exec_arg_addopt(eargp, INT2FIX(0), INT2FIX(write_pair[0]));
@@ -5557,18 +5557,18 @@ pipe_open(struct rb_exec_arg *eargp, VALUE prog, const char *modestr, int fmode,
break;
case FMODE_READABLE:
if (rb_pipe(pair) < 0)
- rb_sys_fail(cmd);
+ rb_sys_fail_str(prog);
if (eargp)
rb_exec_arg_addopt(eargp, INT2FIX(1), INT2FIX(pair[1]));
break;
case FMODE_WRITABLE:
if (rb_pipe(pair) < 0)
- rb_sys_fail(cmd);
+ rb_sys_fail_str(prog);
if (eargp)
rb_exec_arg_addopt(eargp, INT2FIX(0), INT2FIX(pair[0]));
break;
default:
- rb_sys_fail(cmd);
+ rb_sys_fail_str(prog);
}
if (eargp) {
rb_exec_arg_fixup(eargp);
@@ -5597,7 +5597,7 @@ pipe_open(struct rb_exec_arg *eargp, VALUE prog, const char *modestr, int fmode,
close(write_pair[1]);
}
errno = e;
- rb_sys_fail(cmd);
+ rb_sys_fail_str(prog);
}
break;
}
@@ -7967,7 +7967,7 @@ do_io_advise(rb_io_t *fptr, VALUE advice, off_t offset, off_t len)
if (rv) {
/* posix_fadvise(2) doesn't set errno. On success it returns 0; otherwise
it returns the error code. */
- rb_syserr_fail(rv, RSTRING_PTR(fptr->pathv));
+ rb_syserr_fail_str(rv, fptr->pathv);
}
return Qnil;