system() and no console ?
- From: Bugs <dont@xxxxxxx>
- Date: Thu, 28 Jul 2005 09:53:42 -0700
I'm very new to C and am having a hard time figuring out how to pass a command to the underlying OS so as it doesn't keep the console window open. By double-clicking from Windows Explorer, I want the other process to just spawn and the console to close.
For example, on Windows XP, I make the following call:
system(my_command);
where my_command = 'my_program.exe'.
But in Windows the console window stays open until my_program.exe exits. I guess that makes sense but how would I change my_command or is there an alternative to system() that would spawn a new process and then immediately return so my application can complete and close the console? I tried 'my_program.exe &', but that didnt work either.
Thanks! .
- Follow-Ups:
- Re: system() and no console ?
- From: Bugs
- Re: system() and no console ?
- From: Walter Roberson
- Re: system() and no console ?
- Prev by Date: Re: Should function argument be changed in function body?
- Next by Date: Re: system() and no console ?
- Previous by thread: Design question dealing with char* function
- Next by thread: Re: system() and no console ?
- Index(es):
Relevant Pages
|