suspension of long process

Dave Decot decot at hpisod2.HP.COM
Fri Oct 5 03:24:04 AEST 1990


The signal SIGSTOP can be sent to the process (or process group) from
some other process at any time in the future, and the process (group)
will be suspended.  To get it going again later, it can send the
SIGCONT signal to the process (group).

You can have the job itself save the process (group) ID by having it
open some file and write its process ID there (or process group ID, from
calling getpgid()), and picking it up later.

>From a shell script or cron job (see crontab(1)), this would be:

    kill -24 `cat /tmp/foopid`		# stop the foo job
    kill -26 `cat /tmp/foopid`		# resume the foo job

Dave Decot
(This is not necessarily HP's opinion and no warranty is expressed or
implied.)



More information about the Comp.unix.internals mailing list