Package: perl
Version: 5.10.0-13
Severity: normal

When system-calls are processed, all signals are enqueued until the next perl
instruction is executed. When the fork() system-call is processed, and the
parent receives a signal just before the fork() call, both the parent and the
child will process the enqueued signals.

Imho, the enqueued signal-list should be flushed when we are the child process
after the fork().

Example code:
==============================
use strict;
use Time::HiRes qw( alarm );

my $ppid = $$;
my $fork = 0;
$SIG{ALRM} = sub {
        print "[SIGALRM] ppid=$ppid pid=$$ fork=$fork\n" if $$ != $ppid;
    };

for (1..10000) {
    alarm(0.0002 + rand() * 0.0002);
    $fork = 1;
    my $pid = fork();
    $fork = 0;
    if (!defined $pid) {
        warn "fork(): $!\n";
    } elsif ($pid == 0) {
        exit(0);
    }
}

sleep(1);
==============================


-- System Information:
Debian Release: lenny/sid
  APT prefers oldstable
  APT policy: (500, 'oldstable'), (500, 'unstable'), (500, 'testing'), (500, 
'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.25-2-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages perl depends on:
ii  libc6                         2.7-13     GNU C Library: Shared libraries
ii  libdb4.6                      4.6.21-10  Berkeley v4.6 Database Libraries [
ii  libgdbm3                      1.8.3-3    GNU dbm database routines (runtime
ii  perl-base                     5.10.0-13  minimal Perl system
ii  perl-modules                  5.10.0-13  Core Perl modules

Versions of packages perl recommends:
ii  netbase                       4.33       Basic TCP/IP networking system
ii  perl-doc                      5.10.0-13  Perl documentation

Versions of packages perl suggests:
pn  libterm-readline-gnu-perl | l <none>     (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to