• 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 flaw
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: do shell script flaw


  • Subject: Re: do shell script flaw
  • From: Emmanuel LEVY <email@hidden>
  • Date: Sat, 5 Dec 2009 21:50:23 +0100

I wrote too fast. The culprit is most probably a do shell script "top": itself works, but all subsequent calls to do shell script return a "The command exited with a non-zero status" error.

Emmanuel


On Dec 5, 2009, at 5:38 PM, Emmanuel LEVY wrote:

Hi,

There is a problem with the "do shell script" Applescript command.

Our team detected the problem months ago, and narrowing down the bug implied rewriting some codes specifically.

Finally we identified the faulty sequence:

try
	do shell script "ipconfig getifaddr en0"
end try

[...]

do shell script "mkdir -p someNewPath"

In some circumstances (that we are unable to explain, but that we detect and handle gracefully) the "ipconfig" do shell script line fails. The problem is that when it does, then the subsequent "mkdir" do shell script line will spawn an error "The command exited with a non-zero status" instead of doing its job.

1. there is no way that we know to have do shell script "mkdir -p someNewPath" issue such a (script) error.

2. the "mkdir" do shell script line runs thousands of times a day: it will display that nasty behavior only in the case when it runs after the "ipconfig" line, and only in the case when that "ipconfig" line fails.

This has been submitted to bugreport.apple.com.

Emmanuel
Satimage-software, and
Quomodo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/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: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: do shell script flaw
      • From: Axel Luttgens <email@hidden>
References: 
 >Re: Do shell script vs terminal discrepancy (From: airdrummer <email@hidden>)
 >Re: Do shell script vs terminal discrepancy (From: Paul Skinner <email@hidden>)
 >Re: Do shell script vs terminal discrepancy (From: Simon Topliss <email@hidden>)
 >Re: Do shell script vs terminal discrepancy (From: Paul Skinner <email@hidden>)
 >do shell script flaw (From: Emmanuel LEVY <email@hidden>)

  • Prev by Date: Re: Odd File Write Issue
  • Next by Date: Re: do shell script flaw
  • Previous by thread: do shell script flaw
  • Next by thread: Re: do shell script flaw
  • Index(es):
    • Date
    • Thread