• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: do shell script without blocking?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: do shell script without blocking?


  • Subject: Re: do shell script without blocking?
  • From: "Adam K. Wuellner" <email@hidden>
  • Date: Wed, 16 Feb 2005 08:20:28 -0600


On Feb 16, 2005, at 7:08 AM, Stephen Jonke wrote:

Is there any way to use do shell script without it blocking until the script run completes? Putting an & at the end of the command doesn't help.

Technical Note TN2065 do shell script in AppleScript <http://developer.apple.com/technotes/tn2002/tn2065.html#TNTAG5>

<quote>
Q: I want to start a background server process; how do I make do shell script not wait until the command completes?


A: Use "do shell script "command > file_path 2>&1 &"". do shell script will return immediately with no result and your AppleScript script will be running in parallel with your shell script. The shell script's output will go into file_path; if you don't care about the output, use "/dev/null". There is no direct support for getting or manipulating the background process from AppleScript, but see the next question.
</quote>


Did you try redirecting the output to a file or /dev/null? I'm not sure why that makes a difference, but it does.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Determine image mode
      • From: Steve Suranie <email@hidden>
    • Re: do shell script without blocking?
      • From: Stephen Jonke <email@hidden>
References: 
 >do shell script without blocking? (From: Stephen Jonke <email@hidden>)

  • Prev by Date: Re: Quark 6.5 Insert text into insertion point Broken?
  • Next by Date: Re: do shell script without blocking?
  • Previous by thread: do shell script without blocking?
  • Next by thread: Re: do shell script without blocking?
  • Index(es):
    • Date
    • Thread