mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-27 07:58:49 +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);
|
||||
}
|
||||
|
||||
static void
|
||||
handlePipe( int sig )
|
||||
{
|
||||
logf( XW_LOGINFO, "%s", __func__ );
|
||||
}
|
||||
|
||||
int
|
||||
main( int argc, char** argv )
|
||||
{
|
||||
|
@ -710,6 +716,10 @@ main( int argc, char** argv )
|
|||
sact.sa_handler = parentDied;
|
||||
(void)sigaction( SIGUSR1, &sact, NULL );
|
||||
|
||||
memset( &sact, 0, sizeof(sact) );
|
||||
sact.sa_handler = handlePipe;
|
||||
(void)sigaction( SIGPIPE, &sact, NULL );
|
||||
|
||||
if ( port != 0 ) {
|
||||
g_listeners.AddListener( port );
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue