Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript. launch executable without waiting for it toterminate



You should also redirect standard output and standard error, even if it is
just to /dev/null.

do shell script "\³/Path/To/myExecutable\² 2>&1 >/dev/null"

-- 
Matthew Smith


> From: Alex Sheh <email@hidden>
> Date: Fri, 19 Jan 2007 18:46:06 -0800
> To: Matthew Smith <email@hidden>, AppleScript Users
> <email@hidden>
> Conversation: AppleScript. launch executable without waiting for it
> toterminate
> Subject: RE: AppleScript. launch executable without waiting for it toterminate
> 
> To clarify, do shell script "\³/Path/To/myExecutable\² &" results in the hang
> behavior that I would like to avoid.
> (If the ampersand is outside of the first set of quotes the script doesn't
> even compile).
> 
> -----Original Message-----
> From: applescript-users-bounces+asheh=email@hidden
> [mailto:applescript-users-bounces+asheh=email@hidden] On
> Behalf Of Alex Sheh
> Sent: Friday, January 19, 2007 6:43 PM
> To: Matthew Smith; AppleScript Users
> Subject: RE: AppleScript. launch executable without waiting for it toterminate
> 
> True, thanks for catching that.
> 
> -----Original Message-----
> From: applescript-users-bounces+asheh=email@hidden
> [mailto:applescript-users-bounces+asheh=email@hidden] On
> Behalf Of Matthew Smith
> Sent: Friday, January 19, 2007 6:39 PM
> To: AppleScript Users
> Subject: Re: AppleScript. launch executable without waiting for it to
> terminate
> 
> On 20/01/2007 13:26, "Alex Sheh" <email@hidden> wrote:
> 
>> Hi all,
>> I would like to write an AppleScript that launches an executable in
>> the background, and then returns immediately.  Currently I have the
>> following,
>>  
>> do shell script ³/Path/To/myExecutable² &
>> (NOTE: myExecutable runs indefinitely waiting for input)
>>  
>> However, even though I specify an ampersand to launch myExecutable in
>> the background, my AppleScript hangs waiting for myExecutable to
>> terminate.  Is there a way to achieve the described behavior (my
>> AppleScript returns immediately)?
> 
> Don't you mean:
> 
> do shell script "\³/Path/To/myExecutable\² &"
> 
> The ampersand has to be part of the string parameter of do shell script.
> 
> --
> Matthew Smith
> 
> 
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/applescript-users/email@hidden
> Archives: http://lists.apple.com/mailman//archives/applescript-users
> 
> This email sent to email@hidden
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/applescript-users/email@hidden
> Archives: http://lists.apple.com/mailman//archives/applescript-users
> 
> This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden

References: 
 >RE: AppleScript. launch executable without waiting for it toterminate (From: "Alex Sheh" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.