Hi, I updated a patch. I made a patch more simply.
Best regards, Nobuhirio 2011/9/5 Nobuhiro Iwamatsu <iwama...@nigauri.org>: > I forgot that attach patch.... > > thanks, > Nobuhiro > > 2011/9/5 Nobuhiro Iwamatsu <iwama...@nigauri.org>: >> tag 618706 patch >> thanks >> >> Hi. >> >> I created a patch which revise this problem. >> I attached. >> This checks whether to have SA_RESTORER. >> >> Please check this patch. >> >> Best regards, >> Nobuhiro >> >> -- >> Nobuhiro Iwamatsu >> iwamatsu at {nigauri.org / debian.org} >> GPG ID: 40AD1FA6 >> > > > > -- > Nobuhiro Iwamatsu > iwamatsu at {nigauri.org / debian.org} > GPG ID: 40AD1FA6 > -- Nobuhiro Iwamatsu iwamatsu at {nigauri.org / debian.org} GPG ID: 40AD1FA6
diff --git a/src/lib/plt/shl/csys.cxx b/src/lib/plt/shl/csys.cxx index bf471f9..b73eba7 100644 --- a/src/lib/plt/shl/csys.cxx +++ b/src/lib/plt/shl/csys.cxx @@ -313,11 +313,11 @@ namespace afnix { #endif namespace afnix { -#ifdef AFNIX_HAVE_SARESTORER // preset the system signal static void sys_set_signal (void) { // the sigaction stucture struct sigaction sa; + memset(&sa, 0, sizeof(sa)); // SIGPIPE: ignore sa.sa_handler = SIG_IGN; sigemptyset (&sa.sa_mask); @@ -325,18 +325,6 @@ namespace afnix { sa.sa_restorer = NULL; sigaction (SIGPIPE, &sa, NULL); } -#else - // preset the system signal - static void sys_set_signal (void) { - // the sigaction stucture - struct sigaction sa; - // SIGPIPE: ignore - sa.sa_handler = SIG_IGN; - sigemptyset (&sa.sa_mask); - sa.sa_flags = 0; - sigaction (SIGPIPE, &sa, NULL); - } -#endif // preset the system by name diff --git a/src/lib/plt/shl/csys.hxx b/src/lib/plt/shl/csys.hxx index 5c0b355..70b3d41 100644 --- a/src/lib/plt/shl/csys.hxx +++ b/src/lib/plt/shl/csys.hxx @@ -34,7 +34,6 @@ #define AFNIX_HAVE_HOSTNAME #define AFNIX_HAVE_UID #define AFNIX_HAVE_BACKTRACE -#define AFNIX_HAVE_SARESTORER #include <sys/types.h> #include <pwd.h> #include <dlfcn.h>