On Fri, Jun 8, 2012 at 3:21 AM, akr (Akira Tanaka) <akr / fsij.org> wrote:
>
> Issue #2715 has been updated by akr (Akira Tanaka).
>
>
>> .... I realized IO.pid is crazy mistaken feature. It wouldn't work when =
using complex cmdline even if we will not remove the optimization. Sigh. (+=
_+
>
> Killing a complex command line, which invokes many processes, is a differ=
ent problem.
> IO#pid is not a origin of the problem.
> spawn also have same problem as follows.
>
> =A0pid =3D spawn("foo & bar"); Process.kill(:TERM, pid)
>
> Do you say that returning pid feature of spawn is crazy mistaken?
>
> Killing a complex command line needs process group,
> as shell job control does.
>
> To return to this issue, I'm considering adding a new spawn option, :shel=
l.
> This option disables the optimization.
>
> =A0system("simple command", :shell=3D>true)
>
> The default of the option is disabled as now.
>
> This option solves this issue as:
> - shell error messages are printed if :shell =3D> true.
> - doesn't break programs which expects simple commands are direct child p=
rocess.
> - don't need to implement mimic of shell error message printing feature i=
n ruby.

Seems make sense.