[Bug 849703] Regular Expression matching in signal handler causes side-effects

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

 



Product: Fedora
https://bugzilla.redhat.com/show_bug.cgi?id=849703

Jan Pazdziora <jpazdziora@xxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jpazdziora@xxxxxxxxxx
            Version|16                          |17

--- Comment #5 from Jan Pazdziora <jpazdziora@xxxxxxxxxx> ---
Issue still present on Fedora 17:

$ rpm -q perl
perl-5.14.3-218.fc17.i686
$ perl
#!/usr/bin/env perl

sub sighup {
    my $bar="This-Has-Dashes-HUP";
    $bar=~s/.*-//;
    print "$bar\n";

}

$SIG{'HUP'}=\&sighup;

system("while true ; do kill -HUP $$ ; sleep 1 ; done &");

$SIG{'HUP'}=\&sighup;

while (1) {
    my $foo="This:Has:Colons";
    $foo=~s/.*://;
    if ($foo=~m/:/) {
        print "BUG!!: $foo\n";
    }
}    
__END__
HUP
BUG!!: This:Has:Colons
HUP
HUP
HUP
BUG!!: This:Has:Colons
HUP
BUG!!: This:Has:Colons
HUP
BUG!!: This:Has:Colons
HUP
HUP
^C

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=XFFkq3fRp3&a=cc_unsubscribe
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel



[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux