<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/process.c, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Allow waitpid(-1, Process::WNOHANG) to be woken if a waitpid(pid) is</title>
<updated>2024-08-18T09:02:09+00:00</updated>
<author>
<name>Stan Hu</name>
<email>stanhu@gmail.com</email>
</author>
<published>2024-05-17T08:05:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=65fed1c3e439bc47bcf6ec884431a86cb9ebd1dc'/>
<id>65fed1c3e439bc47bcf6ec884431a86cb9ebd1dc</id>
<content type='text'>
...pending

If two threads are running, with one calling waitpid(-1, Process::WNOHANG),
and another calling waitpid($some_pid), and then
$some_other_pid exits, we would expect the waitpid(-1,
Process::WNOHANG) call to retrieve that exit status. However, it
cannot actually do so until $some_pid _also_ exits.

This patch fixes the issue by calling do_waitpid unconditionally in
waitpid_wait; this will ensure that a waitpid -1 actually reaps
something (after first checking that no PID-directed call wants the
process).

[Bug #20490]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
...pending

If two threads are running, with one calling waitpid(-1, Process::WNOHANG),
and another calling waitpid($some_pid), and then
$some_other_pid exits, we would expect the waitpid(-1,
Process::WNOHANG) call to retrieve that exit status. However, it
cannot actually do so until $some_pid _also_ exits.

This patch fixes the issue by calling do_waitpid unconditionally in
waitpid_wait; this will ensure that a waitpid -1 actually reaps
something (after first checking that no PID-directed call wants the
process).

[Bug #20490]
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) a7ff264477105b5dc0ade6facad4176a1b73df0b: [Backport #20393]</title>
<updated>2024-07-06T04:26:26+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2024-07-06T04:26:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5577e5d396cc8f062833b67d6280db6cc8501e7a'/>
<id>5577e5d396cc8f062833b67d6280db6cc8501e7a</id>
<content type='text'>
	Don't clear pending interrupts in the parent process. (#10365)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Don't clear pending interrupts in the parent process. (#10365)
</pre>
</div>
</content>
</entry>
<entry>
<title>[3.2 backport] Fix compile error on older systems without clock_get* (#8948)</title>
<updated>2023-11-21T13:04:00+00:00</updated>
<author>
<name>Bo Anderson</name>
<email>mail@boanderson.me</email>
</author>
<published>2023-11-21T13:04:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6ad47f356b8d6cafe2da6306aab801af406ee94e'/>
<id>6ad47f356b8d6cafe2da6306aab801af406ee94e</id>
<content type='text'>
Fix compile error on older systems without clock_get*</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix compile error on older systems without clock_get*</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 901b6d9c5025a30b3d7a5ed0a2c00baf9cfb061d: [Backport #19853]</title>
<updated>2023-09-24T05:16:10+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2023-09-24T05:16:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9cd28caa7cc3b0d987db7c1231fe101fb3b27399'/>
<id>9cd28caa7cc3b0d987db7c1231fe101fb3b27399</id>
<content type='text'>
	Validate the typed data before dereferencing the internal struct.
	 (#8315)

	---
	 process.c                  |  5 +++--
	 test/fiber/test_process.rb | 21 +++++++++++++++++++++
	 2 files changed, 24 insertions(+), 2 deletions(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Validate the typed data before dereferencing the internal struct.
	 (#8315)

	---
	 process.c                  |  5 +++--
	 test/fiber/test_process.rb | 21 +++++++++++++++++++++
	 2 files changed, 24 insertions(+), 2 deletions(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow waitpid(-1) to be woken if a waitpid(pid) call is pending</title>
<updated>2023-09-09T09:51:25+00:00</updated>
<author>
<name>KJ Tsanaktsidis</name>
<email>kj@kjtsanaktsidis.id.au</email>
</author>
<published>2023-08-18T13:19:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0b7a4fbaa9c56d2c67d00d86c69f9e5c71803267'/>
<id>0b7a4fbaa9c56d2c67d00d86c69f9e5c71803267</id>
<content type='text'>
If two threads are running, with one calling waitpid(-1), and another
calling waitpid($some_pid), and then $some_other_pid exits, we would
expect the waitpid(-1) call to retrieve that exit status; however, it
cannot actually do so until $some_pid _also_ exits.

This patch fixes the issue by unconditionally checking for pending
process group waits on SIGCHLD, and then allowing pending pid-only waits
to "steal" the notification.

[Fixes #19387]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If two threads are running, with one calling waitpid(-1), and another
calling waitpid($some_pid), and then $some_other_pid exits, we would
expect the waitpid(-1) call to retrieve that exit status; however, it
cannot actually do so until $some_pid _also_ exits.

This patch fixes the issue by unconditionally checking for pending
process group waits on SIGCHLD, and then allowing pending pid-only waits
to "steal" the notification.

[Fixes #19387]
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Change formatting in the exec docs</title>
<updated>2022-11-19T02:38:16+00:00</updated>
<author>
<name>Maciek Rząsa</name>
<email>maciejrzasa@gmail.com</email>
</author>
<published>2022-11-19T02:38:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=50c6cabadca44b7b034eae5dcc8017154a2858bd'/>
<id>50c6cabadca44b7b034eae5dcc8017154a2858bd</id>
<content type='text'>
The last part of the sentence was accidentally put in enumeration, It
made an impression that it's one of the rules, not the result of
applying the rules.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The last part of the sentence was accidentally put in enumeration, It
made an impression that it's one of the rules, not the result of
applying the rules.</pre>
</div>
</content>
</entry>
<entry>
<title>Using UNDEF_P macro</title>
<updated>2022-11-16T09:58:33+00:00</updated>
<author>
<name>S-H-GAMELINKS</name>
<email>gamelinks007@gmail.com</email>
</author>
<published>2022-11-15T04:24:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1f4f6c9832d83e7ebd65ccf4e95cef358b3512c6'/>
<id>1f4f6c9832d83e7ebd65ccf4e95cef358b3512c6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Followed up 796069b2882d8a67ecc36bda7c72affcbad09dae</title>
<updated>2022-09-22T02:35:28+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2022-09-22T00:39:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6b0b326ef26478e96d176ed2013530e368e32440'/>
<id>6b0b326ef26478e96d176ed2013530e368e32440</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>getrlimit adding RLIMIT_NPTS constant.</title>
<updated>2022-09-21T09:07:59+00:00</updated>
<author>
<name>David Carlier</name>
<email>devnexen@gmail.com</email>
</author>
<published>2021-04-10T11:47:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=796069b2882d8a67ecc36bda7c72affcbad09dae'/>
<id>796069b2882d8a67ecc36bda7c72affcbad09dae</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Tweak the doc for `Process.kill` signature</title>
<updated>2022-09-21T06:21:27+00:00</updated>
<author>
<name>Koichi ITO</name>
<email>koic.ito@gmail.com</email>
</author>
<published>2022-05-23T07:40:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e3b178066b6ec6c2f4f6e038c303cc50db35cf3d'/>
<id>e3b178066b6ec6c2f4f6e038c303cc50db35cf3d</id>
<content type='text'>
Replacing `...` with `*pids` seems to clarify the expected variadic arguments.

Note that the expected arguments are two or more with a signal and pids.
That is, the method must have at least one pid, which cannot be omitted:

```console
% ruby -e 'Process.kill(0)'
-e:1:in `kill': wrong number of arguments (given 1, expected 2+) (ArgumentError)
        from -e:1:in `&lt;main&gt;'
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replacing `...` with `*pids` seems to clarify the expected variadic arguments.

Note that the expected arguments are two or more with a signal and pids.
That is, the method must have at least one pid, which cannot be omitted:

```console
% ruby -e 'Process.kill(0)'
-e:1:in `kill': wrong number of arguments (given 1, expected 2+) (ArgumentError)
        from -e:1:in `&lt;main&gt;'
```
</pre>
</div>
</content>
</entry>
</feed>
