Bugzilla – Attachment 79544 Details for
Bug 133596
LTC20983- IBM Java2-142 JVM Crashes (i686)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
gam_error_sigaction.patch
gam_error_sigaction.patch (text/plain), 2.92 KB, created by
LTC BugProxy
on 2006-04-21 21:38:13 UTC
(
hide
)
Description:
gam_error_sigaction.patch
Filename:
MIME Type:
Creator:
LTC BugProxy
Created:
2006-04-21 21:38:13 UTC
Size:
2.92 KB
patch
obsolete
>--- gamin-0.1.5/lib/gam_error.c.orig 2005-08-01 14:04:50.000000000 -0700 >+++ gamin-0.1.5/lib/gam_error.c 2006-04-21 07:42:13.568480736 -0700 >@@ -44,7 +44,7 @@ > } > > static void >-gam_error_signal(int no) { >+gam_error_signal(int no, siginfo_t * si, void *sig_data) { > got_signal = !got_signal; > gam_debug_active = -1; /* force going into gam_debug() */ > } >@@ -58,18 +58,32 @@ > gam_error_init(void) { > > if (initialized == 0) { >- signal_handler prev; >+ int rc; >+ struct sigaction act, oldact; > > initialized = 1; > if (getenv("GAM_DEBUG") != NULL) { > do_debug = 1; > gam_debug_active = 1; > } >- prev = signal(SIGUSR2, gam_error_signal); >+ >+ /* before trying to register our handler, check if one >+ already exists. If so, don't change it. */ >+ rc = sigaction(SIGUSR2, NULL, &oldact); >+ if (!rc && (oldact.sa_sigaction != SIG_IGN) && (oldact.sa_sigaction != SIG_DFL) >+ && (oldact.sa_sigaction != NULL)) >+ return; >+ >+ act.sa_sigaction = gam_error_signal; >+ sigemptyset(&act.sa_mask); >+ act.sa_flags = SA_SIGINFO; >+ rc = sigaction(SIGUSR2, &act, &oldact); >+ > /* if there is already an handler switch back to the original > to avoid disturbing the application behaviour */ >- if ((prev != SIG_IGN) && (prev != SIG_DFL) && (prev != NULL)) >- signal(SIGUSR2, prev); >+ if (!rc && (oldact.sa_sigaction != SIG_IGN) && (oldact.sa_sigaction != SIG_DFL) >+ && (oldact.sa_sigaction != NULL)) >+ sigaction(SIGUSR2, &oldact, NULL); > } > } > >--- gamin-0.1.5/libgamin/gam_error.c.orig 2005-08-09 11:59:29.000000000 -0700 >+++ gamin-0.1.5/libgamin/gam_error.c 2006-04-21 07:42:13.570480432 -0700 >@@ -44,7 +44,7 @@ > } > > static void >-gam_error_signal(int no) { >+gam_error_signal(int no, siginfo_t * si, void *sig_data) { > got_signal = !got_signal; > gam_debug_active = -1; /* force going into gam_debug() */ > } >@@ -58,18 +58,32 @@ > gam_error_init(void) { > > if (initialized == 0) { >- signal_handler prev; >+ int rc; >+ struct sigaction act, oldact; > > initialized = 1; > if (getenv("GAM_DEBUG") != NULL) { > do_debug = 1; > gam_debug_active = 1; > } >- prev = signal(SIGUSR2, gam_error_signal); >+ >+ /* before trying to register our handler, check if one >+ already exists. If so, don't change it. */ >+ rc = sigaction(SIGUSR2, NULL, &oldact); >+ if (!rc && (oldact.sa_sigaction != SIG_IGN) && (oldact.sa_sigaction != SIG_DFL) >+ && (oldact.sa_sigaction != NULL)) >+ return; >+ >+ act.sa_sigaction = gam_error_signal; >+ sigemptyset(&act.sa_mask); >+ act.sa_flags = SA_SIGINFO; >+ rc = sigaction(SIGUSR2, &act, &oldact); >+ > /* if there is already an handler switch back to the original > to avoid disturbing the application behaviour */ >- if ((prev != SIG_IGN) && (prev != SIG_DFL) && (prev != NULL)) >- signal(SIGUSR2, prev); >+ if (!rc && (oldact.sa_sigaction != SIG_IGN) && (oldact.sa_sigaction != SIG_DFL) >+ && (oldact.sa_sigaction != NULL)) >+ sigaction(SIGUSR2, &oldact, NULL); > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 133596
:
63267
| 79544