Killing a background process from a C program

Gordon Marwood marwood at ncs.dnd.ca
Fri Jul 20 01:17:28 AEST 1990


I am in the process of converting a Bourne shell script to C, and I am
having trouble finding out how to identify and kill background
processes.  With the Bourne Shell approach this was simple, using $!.

What I would like to do is start a background process at one point in the
C program, and at a later time kill it.  Currently I am invoking the
background process with system("background_process &");, but none of the
texts that I have available help me to proceed any further.

Any assistance would be appreciated.

Gordon Marwood
Internet: marwood at ncs.dnd.ca



More information about the Comp.lang.c mailing list