Alternative to background execution in Linux

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

Reply to
karthikbalaguru
Loading thread data ...

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

Reply to
Rene

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.

Thx in advans, Karthik Balaguru

Reply to
karthikbalaguru

)

shell command:

$ (sleep 10; application_2)& $ application_1

-- hns

Reply to
hns

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.