[Bioclusters] Re : Problem starting sge_schedd in Startupitems in OS X

Tim Cutts tjrc at sanger.ac.uk
Tue Apr 26 04:45:26 EDT 2005

On 25 Apr 2005, at 9:35 pm, Rayson Ho wrote:

> Then what does your StartupItems script look like??

Aha - sorry, I misunderstood you.  Yes, it looks like Startup scripts 
execute with closed STDIN, STDOUT and STDERR file handles.  It also has 
a frankly bizarre umask.  Look at the permissions on the created file:

-r-s--s---  1 root  wheel  31 26 Apr 09:28 /tmp/log.txt*

I used the following Startup Items script:

# startup script for service anacron, created by daemonic

. /etc/rc.common

case "$1" in

     ConsoleMessage "Starting Rayson Tester"



exit 0

And the following property list (nicked from daemonic-anacron):

   Description = "rayson-test";
   Provides = ("rayson-test");
   Requires = ("Resolver");
   OrderPreference = "None";
   Messages =
     start = "Starting Rayson Tester";
     stop = "Stopping Rayson Tester";
     restart = "Restarting Rayson Tester";

OK, I know it doesn't actually require a Resolver, but that doesn't 
affect the test.

The problem can be 'fixed' by reopening the three standard files from 
/dev/null at some point in the script before the startup command:

exec > /dev/null 2>&1 < /dev/null

At least anything that depends on the file handle existing won't fall 
on its arse.


Dr Tim Cutts
Informatics Systems Group, Wellcome Trust Sanger Institute
GPG: 1024D/E3134233 FE3D 6C73 BBD6 726A A3F5  860B 3CDD 3F56 E313 4233

More information about the Bioclusters mailing list