mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-03 01:50:55 +00:00
fix signal handler for dumping internals to report signal.
This commit is contained in:
parent
059e6ffe2d
commit
7b51c1bb4e
1 changed files with 6 additions and 6 deletions
|
@ -192,7 +192,7 @@ static char *local_hostname = 0;
|
||||||
*/
|
*/
|
||||||
static void dump_stats();
|
static void dump_stats();
|
||||||
#ifndef __MINGW__
|
#ifndef __MINGW__
|
||||||
static void dump_tables();
|
static void dump_tables(int);
|
||||||
#endif
|
#endif
|
||||||
static void handle_accept();
|
static void handle_accept();
|
||||||
static void handle_io();
|
static void handle_io();
|
||||||
|
@ -1135,7 +1135,7 @@ dump_stats()
|
||||||
|
|
||||||
#ifndef __MINGW__
|
#ifndef __MINGW__
|
||||||
static void
|
static void
|
||||||
dump_tables()
|
dump_tables(int sig)
|
||||||
{
|
{
|
||||||
FILE *fptr;
|
FILE *fptr;
|
||||||
|
|
||||||
|
@ -1143,7 +1143,7 @@ dump_tables()
|
||||||
if (access(".", W_OK) != 0)
|
if (access(".", W_OK) != 0)
|
||||||
{
|
{
|
||||||
snprintf(ebuf, sizeof(ebuf),
|
snprintf(ebuf, sizeof(ebuf),
|
||||||
"Failed to access gdomap.dump file for output\n");
|
"Failed to access gdomap.dump file for output (sig %d)\n", sig);
|
||||||
gdomap_log(LOG_ERR);
|
gdomap_log(LOG_ERR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1174,7 +1174,7 @@ dump_tables()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
snprintf(ebuf, sizeof(ebuf),
|
snprintf(ebuf, sizeof(ebuf),
|
||||||
"Failed to open gdomap.dump file for output\n");
|
"Failed to open gdomap.dump file for output (sig %d)\n", sig);
|
||||||
gdomap_log(LOG_ERR);
|
gdomap_log(LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2026,7 +2026,7 @@ init_ports()
|
||||||
/*
|
/*
|
||||||
* Enable table dumping to /tmp/gdomap.dump
|
* Enable table dumping to /tmp/gdomap.dump
|
||||||
*/
|
*/
|
||||||
signal(SIGUSR1, dump_tables);
|
signal(SIGUSR1, (void(*)(int))dump_tables);
|
||||||
#endif /* !__MINGW__ */
|
#endif /* !__MINGW__ */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3704,7 +3704,7 @@ tryWrite(int desc, int tim, unsigned char* dat, int len)
|
||||||
#if defined(__MINGW__) /* FIXME: Is this correct? */
|
#if defined(__MINGW__) /* FIXME: Is this correct? */
|
||||||
rval = send(desc, (const char*)&dat[pos], len - pos, 0);
|
rval = send(desc, (const char*)&dat[pos], len - pos, 0);
|
||||||
#else
|
#else
|
||||||
void (*ifun)();
|
void (*ifun)(int);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Should be able to write this short a message immediately, but
|
* Should be able to write this short a message immediately, but
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue