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

Rayson Ho raysonlogin at yahoo.com
Mon Apr 25 15:49:03 EDT 2005

Seems to be a bug in OSX. Can those who have OSX try to run this from


#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>

 int fd, ret, size;
 char s[1024];
 struct stat buf;

 fd = open("/tmp/log.txt", O_CREAT|O_WRONLY|O_TRUNC);

 size = sprintf(s, "%d\n", fd);

 write(fd, s, size);

 if (ret = fstat(0, &buf))
  size = sprintf(s, "fail: %d\n", ret);
  write(fd, s, size);

 if (ret = fstat(1, &buf))
  size = sprintf(s, "fail2: %d\n", ret);
  write(fd, s, size);

 if (ret = fstat(2, &buf))
  size = sprintf(s, "fail3: %d\n", ret);
  write(fd, s, size);


It writes to /tmp/log.txt if it fails.


--- Barry J Mcinnes <Barry.J.Mcinnes at noaa.gov> wrote:
> I spent a lot of time spinning wheels on this. I started with the
> standard Startup script, massaged it, renamed it, put diagnostic
> lines
> it it, and finally put delays (sleep) at the start of it, which
> eventually made it work 4 out of 5 times on reboot. When it fails, an
> immediate startup by hand would always work.
> In the end I stopped trying to use SGE via StartupItems, and now run
> a
> cron job, which if the sge process is not running start it -> no more
> problems, its always running on the client.
> FWIW, I did even try the PBS startup script in test mode, which never
> fails, so I still do not know why SGE startup fails randomly.
> Barry
> barry.j.mcinnes at noaa.gov
> _______________________________________________
> Bioclusters maillist  -  Bioclusters at bioinformatics.org
> https://bioinformatics.org/mailman/listinfo/bioclusters

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Bioclusters mailing list