summaryrefslogtreecommitdiffstats
path: root/process.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-14 18:30:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-14 18:30:00 +0000
commitc3c65fd2fc9d12ea02bba01b14841c7760c3699c (patch)
tree48d6a440f1d8669c42f9c3a4a0c2b5fbee389fed /process.c
parentf17af09b264975fea3ce03210f740c17c96b62db (diff)
downloadruby-c3c65fd2fc9d12ea02bba01b14841c7760c3699c.tar.gz
ruby-c3c65fd2fc9d12ea02bba01b14841c7760c3699c.tar.xz
ruby-c3c65fd2fc9d12ea02bba01b14841c7760c3699c.zip
* process.c (SAVED_GROUP_ID, p_gid_switch): should be rb_gid_t.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/process.c b/process.c
index a33133c4c..11f500948 100644
--- a/process.c
+++ b/process.c
@@ -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);
}