Re: Best way to launch command-line program from C++ application
Re: Best way to launch command-line program from C++ application
- Subject: Re: Best way to launch command-line program from C++ application
- From: David Gagnon <email@hidden>
- Date: Mon, 23 Mar 2009 14:23:28 -0400
- Thread-topic: Best way to launch command-line program from C++ application
"system" is working perfectly for my needs!
But, I can see a folder icon jumping on the finder's doc for a second.
Is it possible to hide this jumping icon?
Thanks a lot for your help!
On 09-03-20 17:08, "Dave Carrigan" <email@hidden> wrote:
>
> On Mar 20, 2009, at 1:48 PM, David Gagnon wrote:
>
>> So, I tried "exec" but it does
>> not work, because Acrobat is multi-process.
>
> I believe you mean Acrobat is multi-threaded. In any case, you almost
> never want to do an exec without first doing a fork.
>
> system() will do what you want; under the hood, all it's doing is
> fork(2), followed by execve(2), followed by waitpid(2). Note that
> because system() actually calls the shell, you have to take care that
> your command string doesn't have any shell-special characters in it.
> That's why I typically prefer to do my own fork/exec/wait.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden