diff options
-rw-r--r-- | src/util.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -97,9 +97,9 @@ void killSession( const struct user * user ) if ( user->sessionName[0] != '\0' ) { printf( "Terminating session %s of %s.\n", user->sessionName, user->user ); run( true, "loginctl", "terminate-session", user->sessionName ); - sleep( 5 ); - if ( kill( user->sessionLeader, 0 ) == -1 - && ( user->sessionHead == 0 || kill( user->sessionHead, 0 ) == -1 ) ) + sleep( 2 ); + if ( kill( user->sessionLeader, SIGTERM ) == -1 + || user->sessionHead == 0 || kill( user->sessionHead, 0 ) == -1 ) exit( 0 ); } if ( user->sessionHead != 0 && kill( user->sessionHead, SIGTERM ) == 0 ) { |