kinit: correct warnings scope in kdeinit_xio_errhandler()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-05-24 16:24:51 +03:00
parent 96868b9922
commit a8be3520ec

View file

@ -1339,9 +1339,8 @@ static void kdeinit_library_path()
int kdeinit_xio_errhandler( Display *disp )
{
// disp is 0L when KDE shuts down. We don't want those warnings then.
if ( disp )
kWarning() << "Fatal IO error: client killed";
kWarning() << "Fatal IO error: client killed";
if (sock_file[0])
{
@ -1358,7 +1357,7 @@ int kdeinit_xio_errhandler( Display *disp )
}
if ( disp )
kWarning() << "Sending SIGHUP to children.";
kWarning() << "Sending SIGHUP to children.";
/* this should remove all children we started */
KDE_signal(SIGHUP, SIG_IGN);
@ -1367,14 +1366,14 @@ int kdeinit_xio_errhandler( Display *disp )
sleep(2);
if ( disp )
kWarning() << "Sending SIGTERM to children.";
kWarning() << "Sending SIGTERM to children.";
/* and if they don't listen to us, this should work */
KDE_signal(SIGTERM, SIG_IGN);
kill(0, SIGTERM);
if ( disp )
kWarning() << "Exit.";
kWarning() << "Exit.";
exit( 0 );
return 0;