in reply to Re: writing looped programs
in thread writing looped programs

Generally speaking, you should try to make any signal handler as quick as ever possible.

Current versions of Perl are not threadsafe, IIRC primarily because perl itself makes use of libraries that are not threadsafe.

The potential problem is that if your long sub, executed by your signal handler, takes a lot of time then the signal handler may be called a second time. If this happens while perl is executing a system call that is not threadsafe you will get a core dump.

"Livet är hårt" sa bonden.
"Grymt" sa grisen...

Replies are listed 'Best First'.
Re: Re: Re: writing looped programs
by thor (Priest) on Jan 31, 2002 at 02:18 UTC
    Of course, you could always have it fork off a child process if you expect the sub to run long. All depends on what you're trying to do...