• 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
Crashing bug in 'do shell script' since Mac OS X 10.4.2 - with a workaround
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Crashing bug in 'do shell script' since Mac OS X 10.4.2 - with a workaround


  • Subject: Crashing bug in 'do shell script' since Mac OS X 10.4.2 - with a workaround
  • From: "Scott Babcock" <email@hidden>
  • Date: Mon, 16 Jan 2006 19:46:16 -0800
  • Thread-topic: Crashing bug in 'do shell script' since Mac OS X 10.4.2 - with a workaround

Apple revised 'do shell script' in 10.4.2 and 10.4.3 to improve its
performance and apparently made it thread-unsafe in the process.

I use the 'ps' utility to poll the process list so my scripts are
synchronized with the state of certain key components that I'm
automating, and I had no problems before 10.4.2. Since upgrading,
though, I've been getting random crashes in my scripts at the
synchronization points.

In addition to the scripts themselves, I'm also running a Carbon
application that polls the process list, and it appears that the
application and 'do shell script' are now sharing a single environment.
If things interact in just the wrong way, 'do shell script' gets stopped
mid-process, its data gets trashed, and it crashes when it restarts.

I've logged a RADAR bug on this, but I can't revert to 10.3.9 waiting
for the fix. The workaround is to spawn another shell to get process
isolation:

    set shellCmd to "ps -xco state,command | grep -E
'^(S|I).*myProcName$'"
    do shell script "sh -c " & (quoted form of shellCmd)

 _______________________________________________
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

  • Prev by Date: Re: Finder scripting bug
  • Next by Date: Q: Ensuring file selection list is in alpha order?
  • Previous by thread: Re: Print Setup in Adobe Illustrator CS
  • Next by thread: Q: Ensuring file selection list is in alpha order?
  • Index(es):
    • Date
    • Thread