2
I am programming a watchdog for my system, at the beginning of the code I need to run the application in the background, for this I use the command:
system(". /meuprogram&");
But the program understands the '&' (necessary to open process in the background) as a parameter expected by the application.
The command ". /myprogram&" executed directly by the terminal works correctly, but in C this problem is occurring.
The important thing is to be able to open my application in the background and continue the execution of the watchdog. Any ideas? Thanks!
I think the solution will be a little more complex. You should use Fork() with exec() routines. Give a search on this. If I have time, put an answer. But for that I need to test and there is the lack of time. : -) See this: http://stackoverflow.com/questions/8319484/regarding-background-processes-using-fork-and-child-processes-in-my-dummy-shel
– cantoni