--Apple-Mail-13-63668484
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed

Hi,

i'm writing a distrubuted process queueing and scheduling daemon
in Ruby (for Linux / MacOS X).

The scheduler can suspend Unix processes (TSTP signal), and resume
them with a CONT signal. This already works fine.

But the wrapper for the process is unable to differentiate between
a Suspend (TSTP) and a 'normal' termination of the child.

Here's the code:
# start
@pid  ork {
       exec(@command)
  }
trap("CLD") {
      puts "P: Child pid #{@pid}: caught signal or terminated"
      # notify daemon only if signal was not a TSTP
     # ... ?
}

which always outputs the line when the child process changes its state
(no matter if Suspend or Die) - which is the definition of CLD.

Is there any way for trap() to ignore the Suspend signal?
Adding 'trap("TSTP", "IGNORE")' before 'exec()' will cause the process
to completely ignore the TSTP signals...

Maybe someone can help me.

Greetings from Austria,
christopher



--Apple-Mail-13-63668484
content-type: application/pgp-signature; x-mac-type=70674453;
	nameP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFETKijZ/Q/4kVJe9ERAnltAKCXkgPhES+hV8QVNfoaLVusAtH5WACdHIjY
93vE5EGPiKu9617N7jX1dT4KK
-----END PGP SIGNATURE-----

--Apple-Mail-13-63668484--