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
> >directly instead of using
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 directly instead of using WIFEXITED(), WEXITCODE() and
friends...
In C, sure. But in Perl, fid
On Sun, Sep 06, 2015 at 11:36:00AM +0200, Niels Thykier wrote:
> 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
> > $ pe
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
>
T
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
--
Jakub Wilk
Package: debhelper
Version: 9.20150811
Severity: minor
debhelper manpage includes this example of how to embed #DEBHELPER# in
Perl code:
my $temp="set -e\nset -- @ARGV\n" . << 'EOF';
#DEBHELPER#
EOF
system ($temp) / 256 == 0
or die "Problem with debhelper scripts: $!";
Th
6 matches
Mail list logo