Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: mysqld doesn't honor "kill -15" -anymore
ks%ub.uni-mainz.de@localhost said:
> Looking for possible causes I came across http://mail-index.netbsd.org/
> source-changes/2010/05/20/msg010124.html and indeed backing out this
> change "fixed" the problem
Hmm - while I think my fix is basically correct there could be a side
effect of an internal use of sigtimedwait() which causes misinterpretation
of its return value.
Can you try the attached patch? (and restore the kernel fix)
Consider this preliminary -- there is a binary compatibility issue
which might require some syscall renaming.
sorry for the trouble
best regards
Matthias
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
#
# old_revision [9cb06c968178c218de279da4479262e585c4e0ae]
#
# patch "lib/libc/sys/sigwait.c"
# from [138bcb0b7438d67c394786b593183dd9b2b4a995]
# to [484b8228bbd8332b286e6e8486b62701d228bac4]
#
============================================================
--- lib/libc/sys/sigwait.c 138bcb0b7438d67c394786b593183dd9b2b4a995
+++ lib/libc/sys/sigwait.c 484b8228bbd8332b286e6e8486b62701d228bac4
@@ -53,12 +53,11 @@ _sigwait(const sigset_t * __restrict set
int
_sigwait(const sigset_t * __restrict set, int * __restrict signum)
{
- siginfo_t si;
- int error;
+ int sig;
- error = sigtimedwait(set, &si, NULL);
- if (!error)
- *signum = si.si_signo;
-
- return (error);
+ sig = __sigtimedwait(set, NULL, NULL);
+ if (sig < 0)
+ return (-1);
+ *signum = sig;
+ return (0);
}
Home |
Main Index |
Thread Index |
Old Index