hi,
I ve written a Makefile for my c++ files. in that i create targets for server and client. i ve to run the server in the background.but wen i execute the target i should not be using & ie, "./server& " should not be used.. instead i should execute as " ./server " but it has to run at the background....Can any one tell me how i should do this pls....
If your application does not run in the background automatically (fork/setsid), then you have to tell the shell to run the app in the background for you. Make uses "sh" as the default shell. It uses "&" to run things in the background.
>> "./server& " should not be used.
Why? That's how you tell the shell to run it in the background...
thankx for the reply....i m new to this sh commands...so can u pls tell me exactly how shud i run my executable...
sh ./server is it.... and what is the modification i have to do to my makefile or is there anythin i got to include with it....
and der is one more this my executable is a binary executable..so wil there be problem using sh...
Can u pls tell me exactly how to use sh for binary executable...
Last edited by sandy2511; April 18th, 2011 at 11:47 PM.
Reason: did not tell it wa a binary executable..
Bookmarks