What is shell error code 3?

I’m executing a shell method and get an error code 3. The docs say

A bit of Goggling didn’t give me anything helpful. Any ideas what the 3 means?

In general terms it means that the process that the shell was trying to attach to didn’t exist. Is it possible that you have a bad “Backend” defined for your Shell instance?

Hm… what would that mean for my shellscript?

[code]dim label as String = BundleID + “-helper.launchd”

dim theShell as new Shell
theShell.Execute("launchctl stop " + label)[/code]

You need the full path to launchctl probably

@Derk Jochems: not that I know about. As far as I can see the shellscript works fine.

errno.h says:

#define ESRCH 3 /* No such process */

so this may it for Mac/Linux.

dim label as String = BundleID + "-helper.launchd"

dim theShell as new Shell
theShell.Execute("sudo /bin/launchctl stop " + label)

perhaps?

or you should check if the service is actually running first.

Odd.

@Christian Schmitz: I checked if the process is running.

@Derk Jochems: I’ll try with the bin in front. The sudo version is done separately with AuthorizationMBS. Which I still need to test.