|laziness, impatience, and hubris|
Signal (SIGTTIN) in Solaris 8. (code)by deprecated (Priest)
|on Jun 29, 2001 at 18:16 UTC ( #92625=perlquestion: print w/replies, xml )||Need Help??|
deprecated has asked for the wisdom of the Perl Monks concerning the following question:
I have a bunch of perl scripts that have runtimes that extend past 24 hours. Mostly I am reading tape drives and passing hundreds of gigs through thumbnailing and conversion utilities. Usually I just run these out of my terminal window. However, my laptop is prone to crashing while our servers (ultra 10s) are not. So I run them nohup and watch the output.
There is no TTY input requested (<> for example), but some of my jobs are dying with SIGTTIN. The ever helpful manpage for signal(5) has this to say:
Now, my feeling here is that the machine thinks my program is asking for input and there is no controlling tty so it is dying.
If his highness tilly doesn't mind, i'd like to have a discussion about signals in perl. And japhy has something to contribute here too because of a discussion we had on fun with perl a few months ago.
This seems strange. Youre executing next outside of a loop? Well, as I understand it, you can use last to get out of a loop like this:
and in fact, Randal recommended this and said he uses it frequently on a program that may be having a problem in a loop so he can ^C out of the loop -- but not the program. People scorned the "solution", but I think it has a certain elegance to it.
This is all fine and good, but even the perl documentation (I forget which doc at the moment) mentions that Solaris is among the unixen with hopelessly b0rked signals. And, I've been bitten by this before.
So what I'd like to do is catch this SIGTTIN and skip whatever my code is doing that is pissing solaris off.
Back to Seekers of Perl Wisdom