Monday, 15 March 2010

How to run linux application in background which uses shell? -



How to run linux application in background which uses shell? -

i have application/binary c programme defaults uses shell take inputs user. so, when start application in background using & stops automatically, because of implementation on have no access. when run code

istatus = system("./flute-static -send -a232.0.0.1/6666 a.txt &");

it gives output [1] 21970, pid.

then if press enter, gives output

[1]+ stopped ./flute-static -send -a232.0.0.1/6666 a.txt

and fails send data. how can solve problem. please help me. in advance.

you can seek nohup

istatus = system("nohup ./flute-static -send -a232.0.0.1/6666 a.txt &");

nohup means: not terminate process when stty cutting off.

or can utilize screen

https://www.mattcutts.com/blog/a-quick-tutorial-on-screen/

linux shell background-process

No comments:

Post a Comment