Hi Tim,

I have tried to launchctl start virtuoso-t appended with the -f parameter:

<dict>
        <key>Disabled</key>
        <false/>
        <key>UserName</key>
        <string>root</string>
        <key>GroupName</key>
        <string>wheel</string>
        <key>Label</key>
        <string>com.openlinksw.vos</string>
        <key>Program</key>
        <string>/usr/local/virtuoso-opensource/bin/virtuoso-t</string>
        <key>ProgramArguments</key>
        <array>
                <string>-f</string>
        </array>
        <key>KeepAlive</key>
        <dict>
                <key>SuccessfulExit</key>
                <false/>
        </dict>
        <key>WorkingDirectory</key>
        <string>/usr/local/virtuoso-opensource/var/lib/virtuoso/db/</string>
</dict>

that didn't change the behaviour:

$ sudo launchctl list                            (02-03-10 22:42)
Password:
PID     Status  Label
-       0       0x1003220c0.mach_init.mdworker32
<snip>
87779   -       0x100322620.anonymous.httpd
87776   -       0x10031fb20.anonymous.httpd
87767   -       0x1001018b0.anonymous.virtuoso-t
-       0       com.openlinksw.vos
87734   -       0x10031f860.anonymous.zsh
87733   -       0x10031f5a0.anonymous.sshd
87731   -       0x10031b3b0.anonymous.sshd
<snip>

Any other suggestions?

~Ceriel

> Date: Mon, 01 Mar 2010 12:02:52 +0000
> From: Tim Haynes <[email protected]>
> Subject: Re: [Virtuoso-users] How to start ./virtuoso-t with a
>       non-forked/daemonized parameter?
> To: [email protected]
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Ceriel Jacobs wrote:
>> Hi list,
>> 
>> Correctly starting Virtuoso on Mac OS X with launchd (a .plist) fails. 
>> Virtuoso-t starts, that is not the problem. 
>> 
>> But the process cannot be controlled any further with launchctl commands.
>> When looking further into launchctl, you see that the originally start 
>> process died, and a new one is created:
>> [user@dev ~]$ sudo launchctl list
>> PID  Status  Label
>> <snip>
>> 12378        -       0x10031fb20.anonymous.virtuoso-t
>> -    0       com.openlinksw.vos
>> <snip>
>> 
>> My guess is that virtuoso forks itself. Forking is not good behavior when 
>> starting processes with launchd, see launchd.plist documentation:
>> <http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html>
>> 
>> It is like watchdogd, and shares watchdogd's requirement that processes do 
>> not attempt to fork or daemonize on their own. If a process goes into the 
>> background launchd will lose track of it and attempt to relaunch it.
>> 
>> 
>> Which parameter is available to start virtuoso in a non-forked/daemonized 
>> way?
> 
> I'd expect -f (+foreground) should help here.
> 
> HTH,
> 
> ~Tim
> -- 
> Tim Haynes
> Product Development Consultant
> OpenLink Software


Reply via email to