[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a question on C++



On Tue, 10 Jul 2001, b g wrote:

> Hi list!
> Can anyone help me with a problem i have?
> i've written a c++ program (using kdevelop under radhat 7.1) which takes 12
> parameters. i need to run it several hundred times, changing each time
> another parameter. in order to do this another program was writen with a
> for loop in it.
> the loop contains system() comand, that boots the big program. everything
> goes ok untill i logout. when i do logout, the programs are killed.
> how can i prevent this?
>

If the controlling program can be written as a Shell script (possible
generated by a C or perl program or whatever) then you can use the
following syntax:

nohup my_prog [ Parameters ] &

to execute it asynchronously.

Perhaps system("nohup my_prog [ Parameters] &") within a C program will
also work. One has only to try.

Regards,

	Shlomi Fish



>
>
> =================================================================
> To unsubscribe, send mail to linux-il-request@linux.org.il with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail linux-il-request@linux.org.il
>



----------------------------------------------------------------------
Shlomi Fish        shlomif@t2.technion.ac.il
Home Page:         http://t2.technion.ac.il/~shlomif/
Home E-mail:       shlomif@techie.com

A more experienced programmer does not make less bugs. He just realizes
what went wrong more quickly.


=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il