Re: lauchd and svnserve
Re: lauchd and svnserve
- Subject: Re: lauchd and svnserve
- From: René v Amerongen <email@hidden>
- Date: Wed, 24 Sep 2008 14:06:22 +0200
Hi Roland,
thanks for the explaining.
Your script is allmost 100% that what I did use with 10.4, except I
did have also ipv6 sockets there. But it did stop working under 10.5.
I will try yours. Otherwise I will fall back with the foreground option.
thanks
René
Op 24 sep 2008, om 12:49 heeft Roland King het volgende geschreven:
don't run it like that. the 'd' argument means daemon-ize and it's a
requirement of launchd that processes do NOT do that. What's
happening is the process is starting, it immediately backgrounds
itself, which means the process launchd starts dies, then launchd
tries to start it up again but it can't because there is a
background daemon process (the one you just started) hogging the
socket. Eventually launchd gives up trying to respawn it and the
error messages in the console stop, and the daemon one is still
there. launchd cannot control processes which do that.
You're also clearly trying to start it up too early, so the first
few really do actually just die and launchd starts them up again,
but it doesn't really know what it's doing.
You could run it in foreground mode by changing that '-d' to '--
foreground'. That will stop launchd going totally nuts trying to
keep starting it up again because it will stay up, and if it does
fall down, launchd will correctly start it for you again.
however a much better idea is to put it into inetd mode and only
start up on demand when someone asks for it, I don't know about you
but I don't use my repository very much. For that you need the file
which follows. That will start one in inetd mode when someone makes
a request on the svn port. In that way the process will be down most
of the time which is less strain on the server and it won't start
until someone asks for it, which means you shouldn't have all those
volume mounting issues.
<?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>Disabled</key>
<false/>
<key>Label</key>
<string>org.tigris.subversion.svnserve</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/svnserve</string>
<string>--inetd</string>
<string>--root=Volumes/Development_Current/_CodeRepository</
string>
</array>
<key>ServiceDescription</key>
<string>Subversion Standalone Server</string>
<key>Sockets</key>
<dict>
<key>Listeners</key>
<array>
<dict>
<key>SockFamily</key>
<string>IPv4</string>
<key>SockServiceName</key>
<string>svn</string>
<key>SockType</key>
<string>stream</string>
</dict>
</array>
</dict>
<key>inetdCompatibility</key>
<dict>
<key>Wait</key>
<false/>
</dict>
</dict>
</plist>
On Sep 24, 2008, at 4:24 PM, René v Amerongen wrote:
Dear list
2.) When I unmount the drive, then the svnserve keeps running. I
thought the the daemon will get killed.
However it restart when the drive is mounted back online. But how
can I get this killed when unmounting the drive.
Thanks in advance
René
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden