NSM: Wait up to 60 seconds for all clients to close.

This commit is contained in:
Jonathan Moore Liles 2013-04-09 17:50:56 -07:00
parent 4d3e4ca4f1
commit bb26718834
1 changed files with 12 additions and 10 deletions

View File

@ -942,12 +942,12 @@ wait_for_killed_clients_to_die ( )
MESSAGE( "Waiting for killed clients to die." ); MESSAGE( "Waiting for killed clients to die." );
for ( int i = 0; i < 24; i++ ) for ( int i = 0; i < 60; i++ )
{ {
MESSAGE( "Loop %i", i ); MESSAGE( "Loop %i", i );
if ( ! killed_clients_are_alive() ) if ( ! killed_clients_are_alive() )
break; goto done;
ssize_t s = read(signal_fd, &fdsi, sizeof(struct signalfd_siginfo)); ssize_t s = read(signal_fd, &fdsi, sizeof(struct signalfd_siginfo));
@ -959,17 +959,19 @@ wait_for_killed_clients_to_die ( )
purge_dead_clients(); purge_dead_clients();
usleep( 200 * 1000 ); /* check OSC so we can get /progress messages. */
osc_server->check();
sleep(1);
} }
if ( killed_clients_are_alive() )
{
WARNING( "Killed clients are still alive" ); WARNING( "Killed clients are still alive" );
/* FIXME: give up on remaining clients and purge them */
}
else
MESSAGE( "All clients have died." );
return;
done:
MESSAGE( "All clients have died." );
} }