diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-14 18:30:00 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-14 18:30:00 +0000 |
commit | 34877b581d61c7a90dea53a8335117d5c863a26c (patch) | |
tree | 48d6a440f1d8669c42f9c3a4a0c2b5fbee389fed | |
parent | f414bd65aec6093f38860d5a9ddca4e4d581c95d (diff) | |
download | ruby-34877b581d61c7a90dea53a8335117d5c863a26c.tar.gz |
* process.c (SAVED_GROUP_ID, p_gid_switch): should be rb_gid_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | process.c | 10 |
2 files changed, 10 insertions, 4 deletions
@@ -1,3 +1,7 @@ +Sun Mar 15 03:29:51 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * process.c (SAVED_GROUP_ID, p_gid_switch): should be rb_gid_t. + Sun Mar 15 02:53:13 2009 Tanaka Akira <akr@fsij.org> * string.c (rb_str_subpat): accept capture name. @@ -4570,7 +4570,7 @@ proc_daemon(int argc, VALUE *argv) * */ -static int SAVED_GROUP_ID = -1; +static rb_gid_t SAVED_GROUP_ID = -1; #ifdef BROKEN_SETREGID int @@ -5233,7 +5233,7 @@ p_gid_sw_ensure(rb_gid_t id) static VALUE p_gid_switch(VALUE obj) { - int gid, egid; + rb_gid_t gid, egid; check_gid_switch(); @@ -5248,7 +5248,8 @@ p_gid_switch(VALUE obj) } else { return GIDT2NUM(egid); } - } else if (egid != SAVED_GROUP_ID) { + } + else if (egid != SAVED_GROUP_ID) { proc_setegid(obj, GIDT2NUM(SAVED_GROUP_ID)); if (rb_block_given_p()) { under_gid_switch = 1; @@ -5256,7 +5257,8 @@ p_gid_switch(VALUE obj) } else { return GIDT2NUM(gid); } - } else { + } + else { errno = EPERM; rb_sys_fail(0); } |