Excellent news! Can I help with anything? As I've already said I'm a beginner. Programming is my hobby and I've just started to work as professional C programmer. So if you think I can be useful in some way do not hesitate to write me!
Best regards,
Tsvetomir
----- Original Message ----
From: R. Tyler Ballance <tyler(a)monkeypox.org>
To: Dave Zarzycki <zarzycki(a)apple.com>
Cc: Tsvetomir Dimitrov <tsurko(a)yahoo.com>; Damien Sorresso <dsorresso(a)apple.com>; Launchd-dev <launchd-dev(a)lists.macosforge.org>
Sent: Monday, 22 September, 2008 7:39:59
Subject: Re: [launchd-dev] launchd on freebsd
On Sun, 2008-09-21 at 18:03 -0700, Dave Zarzycki wrote:
> Tsvetomir,
>
>
> Funny that you should ask. R. Tyler Ballance, the author of the Googleted to
> Summer of Code project, just emailed me about potentially reviving the
> port. Hopefully our new launchd maintainer, Damien, can help you both
> coordinate any porting activity.
(resending since the mailing list ate my first version)
I'd like to point out that all work on the previous port of mine is
likely a total wash as it was before zarzycki@ made a large chunk of
changes for the version of launchd(8) for Leopard.
As it stands now I'm working in a Git repository sitting on my FreeBSD
RELENG_6 machine simply working on getting components compiled or
#ifdef'd out such that they will compile on non-Apple systems.
The approach I intend on taking this time around is to build some CUnit
tests around some of the base levels of functionality before I move onto
the more complicated mach-port-based process management and IPC
mechanisms. I also do not intend on building in any implicit
FreeBSD-isms, as I'd like to take launchd(8) over to my openSUSE
workstations in the future as well ;)
Consider any code you find of mine in the FreeBSD perforce repository as
antique and testament to how much of a n00b I used to be ;)
>
I'll keep the thread updated on any progress :)
Cheers,
-R. Tyler Ballance
>
> Best of luck to you all,
>
>
> davez
>
>
>
>
>
>
>
> On Sep 21, 2008, at 3:16 PM, Kevin Van Vechten wrote:
>
> > I'm not aware of any current activity surrounding that effort, but
> > it's something we'd like to see. Have you checked the list archives
> > to see where things left off?
> >
> >
> > On Sep 20, 2008, at 3:28 PM, Tsvetomir Dimitrov <tsurko(a)yahoo.com>
> > wrote:
> >
> >
> >
> > > Hello,
> > > There was a Google Summer of code project about porting launchd on
> > > FreeBSD. Is this project still active? Have you got any
> > > information about it or any other similar? I will be very happy to
> > > see launchd working on FreeBSD. Unfortunately I am still a
> > > beginner programmer, but I'll do my best to contribute in my free
> > > time.
> > > Thank you in advance!
> > >
> > > Best regards,
> > > Tsvetomir
> > >
> > >
> > >
> > > _______________________________________________
> > > launchd-dev mailing list
> > > launchd-dev(a)lists.macosforge.org
> > > http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev
> > >
> > _______________________________________________
> > launchd-dev mailing list
> > launchd-dev(a)lists.macosforge.org
> > http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev
>
Dear Readers,
I'm trying to get the following command launched by launchd on system
startup
> while `sleep 4`; do echo **clunk** > /tmp/declunk && rm -f /tmp/
declunk; done &
I created a bash script /usr/bin/declunk with
1 #!/bin/bash
2 while `sleep 4`; do echo **clunk** > /tmp/declunk && rm -f /tmp/
declunk; done &
And than create the following launchd plist in /Library/LaunchDaemons
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd
">
3 <plist version="1.0">
4 <dict>
5 <key>Disabled</key>
6 <false/>
7 <key>KeepAlive</key>
8 <false/>
9 <key>Label</key>
10 <string>de.tiggar.declunk</string>
11 <key>ProgramArguments</key>
12 <array>
13 <string>/usr/bin/declunk</string>
14 </array>
15 <key>RunAtLoad</key>
16 <true/>
17 <key>StartOnMount</key>
18 <false/>
19 </dict>
20 </plist>
Next i try to load the agent with:
> Sep 16 22:03:00 iah sudo[7855]: Jan : TTY=ttys000 ; PWD=/
Library/LaunchDaemons ; USER=root ; COMMAND=/bin/launchctl load -w
de.tiggar.declunk.plist
> Sep 16 22:03:00 iah com.apple.launchd[1] (de.tiggar.declunk[7861]):
Stray process with PGID equal to this dead job: PID 7863 PPID 7862 sleep
> Sep 16 22:03:00 iah com.apple.launchd[1] (de.tiggar.declunk[7861]):
Stray process with PGID equal to this dead job: PID 7862 PPID 1 bash
So the question is now. It is possible to have a script like that work
with launchd? What do I have done wrong?
Thanks for your help.
Cheers,
Jan