Bug in kill ???

John Buchanan juancho at dgp.toronto.edu
Mon Feb 1 19:38:08 AEST 2016


=======================================================
The environment I am using is a Personal Iris 4d/20 running
IRIX System V Release 4D1-3.14711181642.

=======================================================

Because of a large job that we keep running I am trying to develop a 
utility that checks a variety of conditions. If any of these conditions are
true then the job is to be suspended until the offending condition negates
itself.  The problem that we are having is that a 

kill(pid,SIGSTOP)

seems to outright kill the process.  This process was
started with the following code.

sprintf(ShellLine,"sh -c '%s &   echo $! > /tmp/runalone'",CommandLine);
system(ShellLine);

After this the file /tmp/runalone contains the pid of the process.

The interesting thing is that if the process is started from a regular shell
the kill command behaves as expected but if the job is started up as above
then the kill command simply kills the job when a kill -20 pid is issued.

This works on all the BSD systems that I have tried.  This all leads to a 
couple of questions.

1) Is this a bug or a feature of Sys V
2) How can I start the job so that the signal catcher will work as expected.


John W. Buchanan                  Dynamic Graphics Project
               			  Computer Systems Research Institute
				  University of Toronto
(416) 978-6619			  Toronto, Ontario M5S 1A4

BITNET:		juancho at explorer.dgp.utoronto
EAN:		juancho at explorer.dgp.toronto.cdn
UUCP:		...!mcvax!explorer.dgp.toronto.edu!juancho




More information about the Comp.sys.sgi mailing list