Unix Programming - How to launch an app from another app

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > September 2004 > How to launch an app from another app





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to launch an app from another app
patrick carosso

2004-09-26, 5:55 pm

Hello,
I need do start an app from another.
Now I use then execv system call: the secondary app starts,
but the first exits! I need the first to go on running!
How can I do? Is there another system call?
Thank you!
Måns Rullgård

2004-09-26, 5:55 pm

"patrick carosso" <carossopatrick@yahoo.it> writes:

> Hello,
> I need do start an app from another.
> Now I use then execv system call: the secondary app starts,
> but the first exits! I need the first to go on running!
> How can I do? Is there another system call?
> Thank you!


Don't multipost.

--
Måns Rullgård
mru@mru.ath.cx
Nick Landsberg

2004-09-26, 5:55 pm

patrick carosso wrote:

> Hello,
> I need do start an app from another.
> Now I use then execv system call: the secondary app starts,
> but the first exits! I need the first to go on running!
> How can I do? Is there another system call?
> Thank you!


the exec family of system calls specifically
supercedes the old process with the new
process.

Either:

1. check out the man pages for fork(2)
and wait(2) and be very, very careful.

or:

2. check out system(3), which
encapsulates the fork(2)/exec(2)/wait(2)
family of calls for you.


NPL

--
"It is impossible to make anything foolproof
because fools are so ingenious"
- A. Bloch
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com