[comp.unix.internals] How can a process put another process to sleep?

shulman@alpha.ces.cwru.edu (Leo Shulman) (03/13/91)

I need some help with the following problem:

I am trying to put a process to sleep from within another process
(both are executing "C" code).  I am currently doing it by sending
a SIGSTP signal, and a SIGCONT to resume.  Unfortunately, this
takes too long.  

What I need is something that performs a similar task to 
sigpause() or pause(), but can be done from a different process.
That is, the process that will be put to sleep will be "Z" and not
"T".  This should increase the speed to a reasonable level.

If this is impossible, is there a way to see the current status of
a particular process from within another one (i.e. to see whether
process A is sleeping, stopped, exiting, etc...).  This would
also solve my problem, although not as cleanly.

I will appreciate any suggestions I get. Thanks in advance.

-- 

		Leo Shulman  <shulman@alpha.ces.cwru.edu>
		     Case Western Reserve University
		           Cleveland, OH 44106