[prev in list] [next in list] [prev in thread] [next in thread] 

List:       grid-engine-dev
Subject:    Signal handling
From:       "=?iso-8859-1?q?G=F6ran_Uddeborg?=" <uddeborg () carmen ! se>
Date:       2004-10-08 16:23:42
Message-ID: 16742.48910.523643.965333 () morgantown ! carmen ! se
[Download RAW message or body]

Is there some good reason the daemon processes ignore so many signals?

Some time ago when I was looking for a problem in sge_execd I had
problems because it ignores almost all signals, including the
debugging signal SIGTRAP.  I reported this as issue 1028.  Today I was
trying to find out why our sge_qmaster was dying, and found a similar
problem since it blocks everything with this piece of code

   sigfillset(&sig_set);
   pthread_sigmask(SIG_SETMASK, &sig_set, NULL);

The reasoning for both daemons seems to be that all signals should be
ignored unless we know a good reason to allow it.  That seems quite
strange to me.

A daemon may have a good reason to ignore a few signals.  SIGHUP
probably is the most canonical example.  Sometimes there are reasons
to do things with SIGC(H)LD too.  But to indiscriminatingly
ignore/block everything seems broken to me.  What is the point of
ignoring such signals as SIGBUS, SIGSEGV, SIGTRAP, and SIGKILL?  Or
SIGTERM for that matter?

In my understanding of signals, the correct thing to do is to leave
them alone unless I know a specific reason to change them.  Why isn't
it done so with the sge-daemons?  What am I missing?

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic