Re: do shell script flaw
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