[#81999] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — ko1@...
Issue #13737 has been updated by ko1 (Koichi Sasada).
4 messages
2017/07/11
[#82005] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — nobu@...
Issue #13737 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/07/12
[#82102] Re: register_fstring_tainted:FL_TEST_RAW(str, RSTRING_FSTR) — Eric Wong <normalperson@...>
Koichi Sasada <ko1@atdot.net> wrote:
4 messages
2017/07/18
[#82151] [Ruby trunk Feature#13637] [PATCH] tool/runruby.rb: test with smallest possible machine stack — Rei.Odaira@...
Issue #13637 has been updated by ReiOdaira (Rei Odaira).
3 messages
2017/07/24
[ruby-core:82075] [Ruby trunk Bug#13501] Process.kill behaviour for negative pid is not documented and may be wrong
From:
shyouhei@...
Date:
2017-07-15 11:24:39 UTC
List:
ruby-core #82075
Issue #13501 has been updated by shyouhei (Shyouhei Urabe).
We looked at this issue at yesterday's developer meeting and agreed that the acceptance of negative pid shall be documented.
But killing other process is ultimately dome by the platform. It seems not possible to completely remove platform dependency.
----------------------------------------
Bug #13501: Process.kill behaviour for negative pid is not documented and may be wrong
https://bugs.ruby-lang.org/issues/13501#change-65807
* Author: toy (Ivan Kuchin)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin14]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Following code will not fail and will print "TERM caught by NN" both for spawned and forked processes:
~~~ ruby
pid = spawn 'ruby', '-e', <<-'RUBY', :pgroup => true
trap('TERM'){ print "TERM caught by #{$$}\n" }
fork
sleep 10
RUBY
sleep 1
Process.kill('TERM', -pid)
~~~
Documentation explains such behaviour for using negative signal (or a string starting with '-'), but not negative pid.
[linux](https://linux.die.net/man/2/kill), [osx](https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man2/kill.2.html) and [POSIX](http://pubs.opengroup.org/onlinepubs/009695399/functions/kill.html) documentation for `kill` describes behaviour for negative pid is to send signal to process group.
As `Process.kill` is [using `killpg`](https://github.com/ruby/ruby/blob/e97ac02f8466275732a33f704480c03da722f485/signal.c#L464) if it is defined, the behaviour may be undefined on systems with `killpg` present but `kill` not conforming to `POSIX` specification.
Also sending negative `signal` with negative `pid` will call `killpg` with negative `pid`.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>