mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
running under valgrind I need to handle SIGPIPE.
This commit is contained in:
parent
7893c2066a
commit
37dc9b7b88
1 changed files with 10 additions and 0 deletions
|
@ -548,6 +548,12 @@ parentDied( int sig )
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
handlePipe( int sig )
|
||||||
|
{
|
||||||
|
logf( XW_LOGINFO, "%s", __func__ );
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main( int argc, char** argv )
|
main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
|
@ -710,6 +716,10 @@ main( int argc, char** argv )
|
||||||
sact.sa_handler = parentDied;
|
sact.sa_handler = parentDied;
|
||||||
(void)sigaction( SIGUSR1, &sact, NULL );
|
(void)sigaction( SIGUSR1, &sact, NULL );
|
||||||
|
|
||||||
|
memset( &sact, 0, sizeof(sact) );
|
||||||
|
sact.sa_handler = handlePipe;
|
||||||
|
(void)sigaction( SIGPIPE, &sact, NULL );
|
||||||
|
|
||||||
if ( port != 0 ) {
|
if ( port != 0 ) {
|
||||||
g_listeners.AddListener( port );
|
g_listeners.AddListener( port );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue