summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--process.c10
2 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 2ee3078c8..3bcb21e6a 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 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);
}