[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Solaris problem w/ SIGCHLD



I encounted a deadlock on solaris when a post install script ran.

I finally tracked it down to the sighandler being improperly initialized.

In lib/psm.c the "satbl" default initialization failed because it makes an assumption on the order of items in struct sigaction. On Linux the handler is the first item in the struct, on solaris sigaction is the second item in the struct.

A very "poor" patch is included below.. This was created out of time pressure, so I'm not sure if it's the right fix (probably isn't) so I will leave it up to the people who better understand this stuff! (FYI the patch does fix the problem, or at least the symptoms...)

--- rpm-4.1.orig/lib/psm.c      Thu Jan 23 20:29:35 2003
+++ rpm-4.1/lib/psm.c   Thu Jan 23 20:29:16 2003
@@ -675,8 +675,13 @@
     struct sigaction act;
     struct sigaction oact;
 } satbl[] = {
+#if defined(sun)
+    { SIGCHLD,  0, { ._funcptr = {handler} } },
+    { -1,       0, { 0    } },
+#else
     { SIGCHLD, 0, { {handler} } },
     { -1,      0, { {NULL}    } },
+#endif
 };
 /*@=fullinitblock@*/

--Mark





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []