Hi there,
Please forgive me if this is an inappropriate place to post an
observation of launchd that I'm finding hard to understand. Please
also feel free to direct me elsewhere as necessary.
I'm trying to execute osascript -e <command> via launchd and it
reports an error (an abort) in the system.log file. More specifically:
launchd[4108]: com.classactionpl.restartvision: exited abnormally:
Abort trap
Others item of interest:
- the user I'm logged in under has not launched the Finder - it is a
kiosk style of user where a custom application is launched in place
of the Finder.
- my plist is under the ~/Library/LaunchAgents i.e. the user's launch
agent's directory
- all is well if I perform the same osascript command from within the
same user's crontab
- all is well if I perform the same osascript command from the
command line
One particular item of interest is: if I "launchd bash", load the
plists and the start the job, the osascript command works! So why
shouldn't the command work outside of this?
Here's the plist I'm using:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://
www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Debug</key>
<true/>
<key>Label</key>
<string>com.classactionpl.restartvision</string>
<key>OnDemand</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>osascript</string>
<string>-e</string>
<string>tell application "World" to quit</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>0</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
</dict>
</plist>
Debug etc. doesn't yield more info.
'hoping that someone can help.
Kind regards,
Christopher
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I thought the Mach goo was starting to be separated out into its own
gooey file? :)
You mention it being more work to keep the artificial division, but I
though the "division" was one of the goals of making launchd "more"
open source? To allow for (namely me :P) the community to start
adapting launchd to other non-Mach (and thus no wonderful MIG)
systems, like FreeBSD. From my understanding _unix_ipc.c and
_mach_ipc.c weren't too "relevant" in terms of offering different IPC
implementations, but I was under the impression that further down the
line I would be throwing pure unix sockets (or otherwise) IPC into
the former for FreeBSD/OpenBSD/etc while the majority of launchd IPC
on Darwin remained tied to Mach ports?
Besides, its a Sunday, tsk tsk, working on a sunday ;)
Cheers,
- -R. Tyler Ballance
Lead Developer, bleep. LLC
http://www.bleepsoft.com
On Sep 24, 2006, at 4:38 PM, source_changes(a)macosforge.org wrote:
> Revision 22881 Author zarzycki(a)apple.com Date 2006-09-24 14:38:16
> -0700 (Sun, 24 Sep 2006) Log MessageFold launchd_mach_ipc.c into
> launchd_core_logic.c. This isn't as bad as it sounds. MIG does
> nearly all of the hard Mach related IPC logic. It was actually more
> work in the long run to keep the artificial division. For the
> casual reader, the code that is in launchd_unix_ipc.c is
> automatically generated from MIG via the ".defs" file. I was
> surprised to see that launchd_mach_ipc.c was empty after the MIG
> callouts were folded into launchd_core_logic.c. In hindsight, that
> made sense. The rest of the Mach goo was folded into launchd_runtime.c
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
iD8DBQFFFv3uqO6nEJfroRsRAr/yAJsEETa07LPUprxZcPf9BYpH6WFHEgCggx29
6yadHZFY7KDL9Tu9m/qLOwo=
=m5Ah
-----END PGP SIGNATURE-----