Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Alternative to background execution in Linux

4 views
Skip to first unread message

karthikbalaguru

unread,
Dec 1, 2009, 11:00:10 AM12/1/09
to
Hi,
I would like to run one application initially .
After 10 seconds, i would like to execute the
second application from the shell.

Let the applications be named as
Application_1 and Application_2.

Application_1 will keep generating some
information continously. It is a continous loop
of information generation.
Application_2 will keep responding to the
information from the Application_1 continously.
Application_1 needs to be executed first
and after 10 seconds, i would like to
execute the Application_2 .

The query is, while Application_1 executes
first, the control will be with that application.
How will i be able to execute the Application_2
from the shell so that it would be able
process the information generated by the
Application_1 ?

Application_1 can be made to run in the
background and after 10 seconds, Application_2
can be invoked from the shell. But, is there
any other idea apart from making Application_1
to run in the background ?

Thx in advans,
Karthik Balaguru

Rene

unread,
Dec 3, 2009, 6:21:17 AM12/3/09
to

I have no clue whether I have understood what exactly Your problem is
correctly. I think that what might be what You would like is have app1
exec app2 when it starts (I mean use the system call exec to start app2)
and have app2 sleep 10 seconds when it is started.

Sincerely,
Rene

karthikbalaguru

unread,
Dec 3, 2009, 11:49:00 AM12/3/09
to
Thx for your response. Interesting idea in combination with the sleep,
but, No, i am not looking for the execution of application_2 from
application_1 via execvp or related commands(system calls).
I am looking to get the control back to the terminal and execution of
the second application(application_2) from the shell/terminal as the
application_1 code cannot be changed.

h...@computer.org

unread,
Dec 3, 2009, 12:08:09 PM12/3/09
to

shell command:

$ (sleep 10; application_2)&
$ application_1

-- hns

0 new messages