Re: NSTask for external tool - keep active/prevent relaunch?
Re: NSTask for external tool - keep active/prevent relaunch?
- Subject: Re: NSTask for external tool - keep active/prevent relaunch?
- From: Trygve Inda <email@hidden>
- Date: Sat, 08 Mar 2014 06:24:02 +0000
- Thread-topic: NSTask for external tool - keep active/prevent relaunch?
>
> On Mar 7, 2014, at 8:38 PM, Trygve Inda <email@hidden> wrote:
>
>> I'd like it to work with md5, ffmpeg and others. These all work fine, but
>> quit after returning their data.
>
> There’s nothing you can do about that, unless those tools allow multiple input
> files to be passed on the command line. Check their man pages.
>
> But running those from NSTask shouldn’t be any slower than doing it from
> something like a shellscript.
>
> (BTW, MD5 digests are trivial to compute using the APIs in
> <CommonCrypto/CommonDigest.h>. There’s no need to launch a tool to do that.
> And to digress further, MD5 isn’t very secure; it’s better to use SHA-1 or
> SHA-256 unless you’re working with something that explicitly requires MD5.)
>
> —Jens
md5 was a poor example but illustrated the problem. The issue is that the
time spent launching the tool is vastly more then doing the tool's work...
In the case were there is no way around using the tool (as there is for
md5).
T.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden