Starting up another process from within a C program

Brent Thomas Corkum corkum at csri.toronto.edu
Tue Nov 6 04:47:52 AEST 1990


What I want to do is start up and run another program in the background from
within a C program. I want to continue to run the program that invokes the 
other program. To make things a little more clear what I'm doing is 
interacting with a user interface and at some point wish to run some
analysis program. The analysis program is a standalone program that accepts
command line arguments to run. But after I start the analysis I want to
continue within the interface. Now, I can successfully do this using
the system function with the following syntax:

system("analysis test.dat &");  /* test.dat is the data file */

What I want to know is whether this is the best way of doing it and what
other options are there. I looked at exec but this seems to kill the parent
process.


Also, I want to have the analysis program ring a bell when it's done. I
looked at the man pages for setbell and ringbell but I can't seem to get
the program to compile, I get the old Undefined function error. So how
do I use these? Or is there another way to ring the keyboard bell from
within a C program.

Brent
corkum at boulder.civ.toronto.edu



More information about the Comp.sys.sgi mailing list