Karim BELABAS on Fri, 22 Sep 2000 15:10:54 +0200 (MET DST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: bug in signal handling, please report


[Ilya:]
> ? default(prettyprinter,0)
>    prettyprinter = "0"
> ? \o2
>    output = 2 (prettyprint)
> ? x
> sh: 0: not found
>   ***   bug in signal handling, please report

This concerns only the CVS version: in 2.0.20, GP would crash (broken pipe).
I was trying to correct this behaviour by trapping SIGPIPE, but it turned out
that this wasn't enough, on Linux at least (see TODO: BUGS (GP specific)). It
also created the following weird behaviour [reported by Igor Schein]:

% echo 'k=0;while(1,print(k++))' | gp -q -f | head -1 
1
   ***   bug in GP (Broken Pipe), please report

[ checked on Solaris. On Linux, it caused my zsh to core dump ! ]

Since it looked like the solution did more evil than good, I removed the new
signal handler, but forgot to remove the signal(SIGPIPE,) call upon
initialization, hence the problem above.

I just found out than on Solaris, my previous solution DOES work. I'll have
to check on Linux at home, but in the meantime I'm applying my patch again,
so that at least on Solaris everything looks fine (except the weirdness
above; I'm correcting the error message).

I've updated the repository.

    Karim.
__
Karim Belabas                    email: Karim.Belabas@math.u-psud.fr
Dep. de Mathematiques, Bat. 425
Universite Paris-Sud             Tel: (00 33) 1 69 15 57 48
F-91405 Orsay (France)           Fax: (00 33) 1 69 15 60 19
--
PARI/GP Home Page: http://www.parigp-home.de/