summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authorIvo Anjo <ivo.anjo@datadoghq.com>2022-08-05 10:40:48 +0100
committerGitHub <noreply@github.com>2022-08-05 18:40:48 +0900
commit74817f3d37bb7153385f682f75e37713c4c8009d (patch)
tree5058887e7153c5daf561e87a105790a8cbb39fa9 /process.c
parentf310ac1cb2964f635f582862763b2155aacf2c12 (diff)
downloadruby-74817f3d37bb7153385f682f75e37713c4c8009d.tar.gz
[DOC] Process._fork does not get called by Process.daemon
As discussed in [Bug #18911], I'm adding some documentation to `Process._fork` to clarify that it is not expected to cover calls to `Process.daemon`. [Bug #18911]: https://bugs.ruby-lang.org/issues/18911 Co-authored-by: Yusuke Endoh <mame@ruby-lang.org>
Diffstat (limited to 'process.c')
-rw-r--r--process.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/process.c b/process.c
index 5d16a3854a..fb31418e00 100644
--- a/process.c
+++ b/process.c
@@ -4353,6 +4353,13 @@ rb_call_proc__fork(void)
* This method is not for casual code but for application monitoring
* libraries. You can add custom code before and after fork events
* by overriding this method.
+ *
+ * Note: Process.daemon may be implemented using fork(2) BUT does not go
+ * through this method.
+ * Thus, depending on your reason to hook into this method, you
+ * may also want to hook into that one.
+ * See {this issue}[https://bugs.ruby-lang.org/issues/18911] for a
+ * more detailed discussion of this.
*/
VALUE
rb_proc__fork(VALUE _obj)