------art_65814_13096798.1153221996166
Content-Type: text/plain; charset=WINDOWS-1252; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On 7/18/06, Yukihiro Matsumoto <matz / ruby-lang.org> wrote:
>
> Hi,
>
> In message "Re: How to call system having trap("CHLD", "IGNORE")?"
>     on Tue, 18 Jul 2006 03:05:07 +0900, Pavel Smerk <smerk / fi.muni.cz>
> writes:
>
> |doing some forks I want to ignore SIGCHLD. But
> |
> |trap("CHLD", "IGNORE")
> |system "echo"
> |
> |ends in ruby 1.8.2 (2005-04-11) [i386-linux] with a following error:
> |
> |in `system': no implicit conversion from nil to integer (TypeError)
> |
> |Where I am wrong?
>
> system() tried to pick up the exit status of forked sub-process.
> Since you've set SIG_IGN sub-process disappeared without notice to
> wait(2) system call, which failed and caused an error you've seen.
> What did you try to accomplish by ignoring SIGCHLD?
>
> It is fairly easy to make system to ignore wait(2) error, but I am not
> sure it is the way to go.
>
>                                                         matz.
>
>
Hmm I conclude from your reply (and tested)
trap('CHILD', 'IGNORE') and
trap('CHILD'){ nil }
do not have the same semantics.
Why should it be a bad idea to allow ignorining a Signal one can handle?

Just my 2**(-10) ;)

Robert

-- 
Deux choses sont infinies : l'univers et la bóŐise humaine ; en ce qui
concerne l'univers, je n'en ai pas acquis la certitude absolue.

- Albert Einstein

------art_65814_13096798.1153221996166--