* cygwin.din (psiginfo): Export.
(psignal): Export. (sys_siglist): Export. * posix.sgml (std-notimpl): Move psiginfo and psignal from here... (std-susv4): ... to here. (std-deprec): Add sys_siglist. * strsig.cc (sys_siglist): New array. (psiginfo): New function. * include/cygwin/signal.h (sys_siglist): Declare. (psiginfo): Declare. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
This commit is contained in:
parent
fab6d5dd03
commit
2f7a5c89cc
@ -1,3 +1,17 @@
|
||||
2011-05-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
|
||||
|
||||
* cygwin.din (psiginfo): Export.
|
||||
(psignal): Export.
|
||||
(sys_siglist): Export.
|
||||
* posix.sgml (std-notimpl): Move psiginfo and psignal from here...
|
||||
(std-susv4): ... to here.
|
||||
(std-deprec): Add sys_siglist.
|
||||
* strsig.cc (sys_siglist): New array.
|
||||
(psiginfo): New function.
|
||||
* include/cygwin/signal.h (sys_siglist): Declare.
|
||||
(psiginfo): Declare.
|
||||
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
|
||||
|
||||
2011-05-04 Christopher Faylor <me.cygwin2011@cgf.cx>
|
||||
|
||||
* dll_list::detach (dll_list::detach): Avoid doing anything with detach
|
||||
|
@ -28,6 +28,7 @@ _sys_errlist DATA
|
||||
sys_nerr = _sys_nerr DATA
|
||||
_sys_nerr DATA
|
||||
sys_sigabbrev DATA
|
||||
sys_siglist DATA
|
||||
_timezone DATA
|
||||
_tzname DATA
|
||||
_Exit SIGFE
|
||||
@ -1167,6 +1168,8 @@ program_invocation_name DATA
|
||||
program_invocation_short_name DATA
|
||||
_printf = printf SIGFE
|
||||
pselect SIGFE
|
||||
psiginfo SIGFE
|
||||
psignal SIGFE
|
||||
pthread_atfork SIGFE
|
||||
pthread_attr_destroy SIGFE
|
||||
pthread_attr_getdetachstate SIGFE
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* signal.h
|
||||
|
||||
Copyright 2004, 2005, 2006 Red Hat, Inc.
|
||||
Copyright 2004, 2005, 2006, 2011 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
@ -261,6 +261,7 @@ struct sigaction
|
||||
|
||||
#define SIG_HOLD ((_sig_func_ptr)2) /* Signal in signal mask */
|
||||
|
||||
void psiginfo (const siginfo_t *, const char *);
|
||||
int sigwait (const sigset_t *, int *);
|
||||
int sigwaitinfo (const sigset_t *, siginfo_t *);
|
||||
int sighold (int);
|
||||
@ -272,8 +273,10 @@ int sigqueue(pid_t, int, const union sigval);
|
||||
int siginterrupt (int, int);
|
||||
#ifdef __INSIDE_CYGWIN__
|
||||
extern const char *sys_sigabbrev[];
|
||||
extern const char *sys_siglist[];
|
||||
#else
|
||||
extern const char __declspec(dllimport) *sys_sigabbrev[];
|
||||
extern const char __declspec(dllimport) *sys_siglist[];
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -407,12 +407,13 @@ details. */
|
||||
240: Export ppoll.
|
||||
241: Export pthread_attr_getstack, pthread_attr_getstackaddr,
|
||||
pthread_getattr_np.
|
||||
242: Export psiginfo, psignal, sys_siglist.
|
||||
*/
|
||||
|
||||
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
|
||||
|
||||
#define CYGWIN_VERSION_API_MAJOR 0
|
||||
#define CYGWIN_VERSION_API_MINOR 241
|
||||
#define CYGWIN_VERSION_API_MINOR 242
|
||||
|
||||
/* There is also a compatibity version number associated with the
|
||||
shared memory regions. It is incremented when incompatible
|
||||
|
@ -527,6 +527,8 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
|
||||
pread
|
||||
printf
|
||||
pselect
|
||||
psiginfo
|
||||
psignal
|
||||
pthread_atfork
|
||||
pthread_attr_destroy
|
||||
pthread_attr_getdetachstate
|
||||
@ -1244,6 +1246,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
|
||||
setutent (XPG2)
|
||||
sys_errlist (BSD)
|
||||
sys_nerr (BSD)
|
||||
sys_siglist (BSD)
|
||||
ttyslot (SUSv2)
|
||||
ualarm (SUSv3)
|
||||
usleep (SUSv3)
|
||||
@ -1375,8 +1378,6 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
|
||||
posix_trace[...]
|
||||
posix_typed_[...]
|
||||
powl
|
||||
psiginfo
|
||||
psignal
|
||||
pthread_attr_getguardsize
|
||||
pthread_attr_setguardsize
|
||||
pthread_attr_setstack
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* strsig.cc
|
||||
|
||||
Copyright 2004, 2007, 2008, 2010 Red Hat, Inc.
|
||||
Copyright 2004, 2007, 2008, 2010, 2011 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
@ -10,6 +10,8 @@ details. */
|
||||
|
||||
#include "winsup.h"
|
||||
#include <cygtls.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
struct sigdesc
|
||||
{
|
||||
@ -64,6 +66,16 @@ const char *sys_sigabbrev[] NO_COPY_INIT =
|
||||
__signals
|
||||
};
|
||||
|
||||
#undef _s
|
||||
#undef _s2
|
||||
#define _s(n, s) s
|
||||
#define _s2(n, s, n1, s1) s
|
||||
const char *sys_siglist[] NO_COPY_INIT =
|
||||
{
|
||||
NULL,
|
||||
__signals
|
||||
};
|
||||
|
||||
#undef _s
|
||||
#undef _s2
|
||||
#define _s(n, s) {n, #n, s}
|
||||
@ -96,3 +108,38 @@ strtosigno (const char *name)
|
||||
return siglist[i].n;
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
psiginfo (const siginfo_t *info, const char *s)
|
||||
{
|
||||
if (s != NULL && *s != '\0')
|
||||
fprintf (stderr, "%s: ", s);
|
||||
|
||||
fprintf (stderr, "%s", strsignal (info->si_signo));
|
||||
|
||||
if (info->si_signo > 0 && info->si_signo < NSIG)
|
||||
{
|
||||
switch (info->si_signo)
|
||||
{
|
||||
case SIGILL:
|
||||
case SIGBUS:
|
||||
case SIGFPE:
|
||||
case SIGSEGV:
|
||||
fprintf (stderr, " (%d [%p])", info->si_code, info->si_addr);
|
||||
break;
|
||||
case SIGCHLD:
|
||||
fprintf (stderr, " (%d %d %d %ld)", info->si_code, info->si_pid,
|
||||
info->si_status, info->si_uid);
|
||||
break;
|
||||
/* FIXME: implement si_band
|
||||
case SIGPOLL:
|
||||
fprintf (stderr, " (%d %ld)", info->si_code, info->si_band);
|
||||
break;
|
||||
*/
|
||||
default:
|
||||
fprintf (stderr, " (%d %d %ld)", info->si_code, info->si_pid, info->si_uid);
|
||||
}
|
||||
}
|
||||
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user