summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-25 05:45:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-25 05:45:28 +0000
commitd90fe02fb69b94fb372dd6bf973c541d4fd78f0d (patch)
tree24343bca454fd2b9e46f806d62453387f593a9e4 /process.c
parenta4c08752f8f556dbf3bc391a36e4692b7740f10c (diff)
* process.c: suppress warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/process.c b/process.c
index 84814bebb6..666743d685 100644
--- a/process.c
+++ b/process.c
@@ -1049,9 +1049,11 @@ rb_proc_exec_n(int argc, VALUE *argv, const char *prog)
int
rb_proc_exec(const char *str)
{
+#ifndef _WIN32
const char *s = str;
char *ss, *t;
char **argv, **a;
+#endif
while (*str && ISSPACE(*str))
str++;
@@ -2093,12 +2095,14 @@ rb_exec(const struct rb_exec_arg *e)
return -1;
}
+#ifdef HAVE_FORK
static int
rb_exec_atfork(void* arg)
{
rb_thread_atfork();
return rb_exec(arg);
}
+#endif
#ifdef HAVE_FORK
#ifdef FD_CLOEXEC
@@ -2828,7 +2832,9 @@ rb_f_sleep(int argc, VALUE *argv)
static VALUE
proc_getpgrp(void)
{
+#if defined(HAVE_GETPGRP) && defined(GETPGRP_VOID) || defined(HAVE_GETPGID)
rb_pid_t pgrp;
+#endif
rb_secure(2);
#if defined(HAVE_GETPGRP) && defined(GETPGRP_VOID)
@@ -4089,7 +4095,9 @@ static VALUE
proc_daemon(int argc, VALUE *argv)
{
VALUE nochdir, noclose;
+#if defined(HAVE_DAEMON) || defined(HAVE_FORK)
int n;
+#endif
rb_secure(2);
rb_scan_args(argc, argv, "02", &nochdir, &noclose);