summaryrefslogtreecommitdiff
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
commit34877b581d61c7a90dea53a8335117d5c863a26c (patch)
tree48d6a440f1d8669c42f9c3a4a0c2b5fbee389fed
parentf414bd65aec6093f38860d5a9ddca4e4d581c95d (diff)
* 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--ChangeLog4
-rw-r--r--process.c10
2 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 2ee3078c873..3bcb21e6a67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/process.c b/process.c
index a33133c4c8a..11f5009488b 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);
}