in reply to Perl RPM upgrade breaks alarm() on SuSE-9.1-i386

Is there something wrong with my test case?

Yes, you're running without strict :)

In your SIGINT handler you are setting the variable $main::last. The loop queries the lecical $last.

Anno

Update: Sorry, scratch it all. I saw a "my" declaration in your code where there was none.

Replies are listed 'Best First'.
Re^2: Perl RPM upgrade breaks alarm() on SuSE-9.1-i386
by cmeyer (Pilgrim) on Mar 28, 2007 at 16:35 UTC

    The user doesn't declare a lexical variable $last, so the while condition is looking at $main::last.

    I would recommend building your own perl and installing it in /usr/local, or some other location that will not interfere with the system's perl installation. It is easy (Configure -des; make test; sudo make install).

    Installing an rpm package that was built for a different version of the os is asking for trouble.

    -Colin.

    WHITEPAGES.COM | INC