diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-19 09:12:06 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-19 09:12:06 +0000 |
commit | de9d264026c870afd79a8843764ccbf60367bb0e (patch) | |
tree | 8d2183a3a4e346ff0e56cd443f6a21df32d4a838 /process.c | |
parent | 26b08ed144e8f051158d746ef5098408433cd022 (diff) | |
download | ruby-de9d264026c870afd79a8843764ccbf60367bb0e.tar.gz |
there is no guarantee that mode_t is as wide as int
POSIX only defines mode_t to be "an integer typea", and in fact
MacOS defines it to be uint16_t. We didn't have NUM2USHORT before
so it did not make sense but now that we have it. Why not check
apptopriately.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2348,7 +2348,7 @@ rb_execarg_parent_start1(VALUE execarg_obj) VALUE param = RARRAY_AREF(elt, 1); VALUE vpath = RARRAY_AREF(param, 0); int flags = NUM2INT(RARRAY_AREF(param, 1)); - int perm = NUM2INT(RARRAY_AREF(param, 2)); + mode_t perm = NUM2MODET(RARRAY_AREF(param, 2)); VALUE fd2v = RARRAY_AREF(param, 3); int fd2; if (NIL_P(fd2v)) { |