ruby-changes:39738
From: nobu <ko1@a...>
Date: Thu, 10 Sep 2015 22:16:07 +0900 (JST)
Subject: [ruby-changes:39738] nobu:r51819 (trunk): Clarify spawn pgroup documentation [ci skip]
nobu 2015-09-10 22:15:55 +0900 (Thu, 10 Sep 2015) New Revision: 51819 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51819 Log: Clarify spawn pgroup documentation [ci skip] * process.c (rb_f_spawn): Be more specific regarding "other values" by having "non-zero positive integers" Add nil, the default value, as a possible value and what it means. Try to use more consistent language. [Fix GH-1008] Modified files: trunk/ChangeLog trunk/process.c Index: ChangeLog =================================================================== --- ChangeLog (revision 51818) +++ ChangeLog (revision 51819) @@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Sep 10 22:15:51 2015 Joe Rafaniello <jrafanie@r...> + + * process.c (rb_f_spawn): Be more specific regarding "other + values" by having "non-zero positive integers" Add nil, the + default value, as a possible value and what it means. + + Try to use more consistent language. + [Fix GH-1008] + Thu Sep 10 15:16:02 2015 Shugo Maeda <shugo@r...> * lib/net/ftp.rb (getmultiline): refactor. Index: process.c =================================================================== --- process.c (revision 51818) +++ process.c (revision 51819) @@ -4062,7 +4062,7 @@ rb_f_system(int argc, VALUE *argv) https://github.com/ruby/ruby/blob/trunk/process.c#L4062 * :unsetenv_others => false : don't clear (default) * process group: * :pgroup => true or 0 : make a new process group - * :pgroup => pgid : join to specified process group + * :pgroup => pgid : join the specified process group * :pgroup => nil : don't change the process group (default) * create new process group: Windows only * :new_pgroup => true : the new process is the root process of a new process group @@ -4127,10 +4127,10 @@ rb_f_system(int argc, VALUE *argv) https://github.com/ruby/ruby/blob/trunk/process.c#L4127 * pid = spawn({"FOO"=>"BAR"}, command, :unsetenv_others=>true) # FOO only * * The <code>:pgroup</code> key in +options+ specifies a process group. - * The corresponding value should be true, zero or positive integer. - * true and zero means the process should be a process leader of a new - * process group. - * Other values specifies a process group to be belongs. + * The corresponding value should be true, zero, a positive integer, or nil. + * true and zero cause the process to be a process leader of a new process group. + * A non-zero positive integer causes the process to join the provided process group. + * The default value, nil, causes the process to remain in the same process group. * * pid = spawn(command, :pgroup=>true) # process leader * pid = spawn(command, :pgroup=>10) # belongs to the process group 10 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/