Bug#797904: [debhelper-devel] Bug#797904: debhelper manpage: #DEBHELPER# in Perl: bad error handling

2015-09-07 Thread Peter Pentchev
On Mon, Sep 07, 2015 at 01:49:52PM +0200, Jakub Wilk wrote: > Hi Peter! > > * Peter Pentchev , 2015-09-07, 14:26: > >Hm, this is a personal pet peeve, feel free to ignore it :) ...but it does > >make me cringe a little bit every time people parse the wait() status code >

Bug#797904: [debhelper-devel] Bug#797904: debhelper manpage: #DEBHELPER# in Perl: bad error handling

2015-09-06 Thread Niels Thykier
On 2015-09-06 11:19, Jakub Wilk wrote: >> my $signal = $? & 0xff; > > This is almost right. :) You need only 7 bits to get the signal number. > The eighth bit is on iff core was dumped: > > $ ulimit -c unlimited > $ perl -E 'system("kill -11 \$\$"); say $? & 0xff, ", ", $? & 0x7f' > 139, 11 >