summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util.c b/src/util.c
index 3037b30..7cd5e5c 100644
--- a/src/util.c
+++ b/src/util.c
@@ -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 ) {