aboutsummaryrefslogtreecommitdiffstats
path: root/process.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-04-04 11:29:57 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-04-04 11:29:57 +0900
commit1d529f382c4b855d22289990c4369ee68ddd3adc (patch)
tree69a4942a818c69a15400c70a7e00e333867651ef /process.c
parent05b7bbecc6cd40add807ee5c85dd282f0c19291c (diff)
downloadruby-1d529f382c4b855d22289990c4369ee68ddd3adc.tar.gz
PID cache is never cleared where `fork` is not used
Diffstat (limited to 'process.c')
-rw-r--r--process.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/process.c b/process.c
index 4237bbd0f7..daf3456bfd 100644
--- a/process.c
+++ b/process.c
@@ -506,11 +506,13 @@ get_pid(void)
return PIDT2NUM(cached_pid);
}
+#if defined HAVE_WORKING_FORK || defined HAVE_DAEMON
static void
clear_pid_cache(void)
{
cached_pid = 0;
}
+#endif
/*
* call-seq: