Browse Source

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

tags/non-daw-v1.2.0
Jonathan Moore Liles 12 years ago
parent
commit
bb26718834
1 changed files with 12 additions and 10 deletions
  1. +12
    -10
      session-manager/src/nsmd.C

+ 12
- 10
session-manager/src/nsmd.C 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();


if ( killed_clients_are_alive() )
{
WARNING( "Killed clients are still alive" );
/* FIXME: give up on remaining clients and purge them */
sleep(1);
} }
else
MESSAGE( "All clients have died." );


WARNING( "Killed clients are still alive" );
return;

done:

MESSAGE( "All clients have died." );
} }






Loading…
Cancel
Save