talexb has asked for the wisdom of the Perl Monks concerning the following question:
I am running an external program and examining the output as part of an event handler. The qstat utility is part of the Sun Grid Engine and tells me what jobs are in the queue.
I compare that list of queued and running jobs against a list of jobs I've previously submitted to the grid engine, and note which jobs appear to have finished (because they're not listed by qstat anymore), and deal with them.open(QSTAT, 'qstat|') or $self->_die("failed to start qstat ($!)"); while (<QSTAT>) { # Read the results, act on them } close QSTAT or ($! ? $self->_die("close qstat ($!)") : $logger->error("close qstat ($?)") );
A bug that's popped up recently is that I'm getting a $? error code of 6 back from close. That's either SIGABRT or SIGIOT, as per /usr/include/asm/signal.h .. I'm just trying to understand what that means, and to find out if Perl is doing anything behind the scenes that I should know about.
On top of the error, I'm getting no data back, so it seems like Linux is not running my command for some reason. Because nothing comes back, my code assumes (ha) that all of the grid engine jobs have finished .. which is a problem.
I've googled, I've search this site, but haven't found anything that helps me understand what this error means.
Alex / talexb / Toronto
"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Closing a piped command gives SIGABRT/SIGIOT
by dave_the_m (Monsignor) on Feb 18, 2005 at 02:42 UTC | |
by talexb (Chancellor) on Feb 18, 2005 at 04:46 UTC | |
by talexb (Chancellor) on Feb 18, 2005 at 22:38 UTC |