natPosixProcess.cc (sigchld_handler): Remove 'si' and 'third' parameters.
2007-08-15 Samuel Thibault <samuel.thibault@ens-lyon.org> * java/lang/natPosixProcess.cc (sigchld_handler) [!SA_SIGINFO]: Remove 'si' and 'third' parameters. Disable calling pmi->old_sigaction.sa_sigaction. (java::lang::PosixProcess*ProcessManager::init) [!SA_SIGINFO]: Set sa.sa_handler instead of sa.sa_sigaction, don't set SA_SIGINFO flag. From-SVN: r127507
This commit is contained in:
parent
f2b6bf20c6
commit
2a97f34e67
2 changed files with 20 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2007-08-15 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||||
|
|
||||||
|
* java/lang/natPosixProcess.cc (sigchld_handler) [!SA_SIGINFO]: Remove
|
||||||
|
'si' and 'third' parameters. Disable calling
|
||||||
|
pmi->old_sigaction.sa_sigaction.
|
||||||
|
(java::lang::PosixProcess*ProcessManager::init) [!SA_SIGINFO]: Set
|
||||||
|
sa.sa_handler instead of sa.sa_sigaction, don't set SA_SIGINFO flag.
|
||||||
|
|
||||||
2007-08-09 Andrew Haley <aph@redhat.com>
|
2007-08-09 Andrew Haley <aph@redhat.com>
|
||||||
|
|
||||||
* testsuite/lib/libjava.exp (libjava_invoke): Log the invocation.
|
* testsuite/lib/libjava.exp (libjava_invoke): Log the invocation.
|
||||||
|
|
|
@ -110,7 +110,11 @@ namespace
|
||||||
// sigwait() on SIGCHLD. The information passed is ignored as it
|
// sigwait() on SIGCHLD. The information passed is ignored as it
|
||||||
// will be recovered by the waitpid() call.
|
// will be recovered by the waitpid() call.
|
||||||
static void
|
static void
|
||||||
|
#ifdef SA_SIGINFO
|
||||||
sigchld_handler (int sig, siginfo_t *si, void *third)
|
sigchld_handler (int sig, siginfo_t *si, void *third)
|
||||||
|
#else
|
||||||
|
sigchld_handler (int sig)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (PosixProcess$ProcessManager::nativeData != NULL)
|
if (PosixProcess$ProcessManager::nativeData != NULL)
|
||||||
{
|
{
|
||||||
|
@ -121,9 +125,11 @@ sigchld_handler (int sig, siginfo_t *si, void *third)
|
||||||
if (pmi->old_sigaction.sa_handler != SIG_DFL
|
if (pmi->old_sigaction.sa_handler != SIG_DFL
|
||||||
&& pmi->old_sigaction.sa_handler != SIG_IGN)
|
&& pmi->old_sigaction.sa_handler != SIG_IGN)
|
||||||
{
|
{
|
||||||
|
#ifdef SA_SIGINFO
|
||||||
if ((pmi->old_sigaction.sa_flags & SA_SIGINFO) != 0)
|
if ((pmi->old_sigaction.sa_flags & SA_SIGINFO) != 0)
|
||||||
pmi->old_sigaction.sa_sigaction(sig, si, third);
|
pmi->old_sigaction.sa_sigaction(sig, si, third);
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
(*pmi->old_sigaction.sa_handler)(sig);
|
(*pmi->old_sigaction.sa_handler)(sig);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,9 +162,15 @@ java::lang::PosixProcess$ProcessManager::init ()
|
||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
memset (&sa, 0, sizeof (sa));
|
memset (&sa, 0, sizeof (sa));
|
||||||
|
|
||||||
|
#ifdef SA_SIGINFO
|
||||||
sa.sa_sigaction = sigchld_handler;
|
sa.sa_sigaction = sigchld_handler;
|
||||||
// We only want signals when the things exit.
|
// We only want signals when the things exit.
|
||||||
sa.sa_flags = SA_NOCLDSTOP | SA_SIGINFO;
|
sa.sa_flags = SA_NOCLDSTOP | SA_SIGINFO;
|
||||||
|
#else
|
||||||
|
sa.sa_handler = sigchld_handler;
|
||||||
|
// We only want signals when the things exit.
|
||||||
|
sa.sa_flags = SA_NOCLDSTOP;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (-1 == sigaction (SIGCHLD, &sa, &pmi->old_sigaction))
|
if (-1 == sigaction (SIGCHLD, &sa, &pmi->old_sigaction))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue