Commit graph

24 commits

Author SHA1 Message Date
Ivailo Monev
7cfcbc3775 kdeui: new KCrash::Backtrace to log backtraces
for programs that cannot call drkonqi to show backtrace (such as
ksmserver or any non-GUI D-Bus service)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-09 12:28:21 +02:00
Ivailo Monev
bdff3fa4e7 kdeui: log backtrace when no KCrash flags are set
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-09 12:17:48 +02:00
Ivailo Monev
6c98720e24 kdeui: implement KCrash::NoRestart flag
for programs that cannot be restarted by simply exec-ing them such as the
KIO slaves which require application socket as argument

note that restarting is maybe works thing - programs started by kdesudo
cannot be restarted (properly) as they are exec-ed by other program that
does the setup for them to function the way they should

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-08 00:36:35 +02:00
Ivailo Monev
d4bf3d7a70 kdeui: exit after logging error when drkonqi is not installed
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 08:54:32 +02:00
Ivailo Monev
41418cb12b kdeui: set the KCrash handler to the default one if command line args are not initialized
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 08:33:04 +02:00
Ivailo Monev
6896f96245 kdeui: check if the KCmdLineArgs pointer is non-null before using it
fixes possible crash (e.g. when KCmdLineArgs is not initialized)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 07:49:43 +02:00
Ivailo Monev
d258df3881 generic: unblock signals when setting handlers for them
generally, those signals should not be blocked but it seems something is
blocking consequent SIGSEGV signals send by `kill` for example

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 07:45:25 +02:00
Ivailo Monev
be2d99738e kdeui: use system() instead of QProcess to execute drkonqi
less things can go wrong

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 07:14:26 +02:00
Ivailo Monev
b3d1569867 kdeui: tag comment as note in KCrash::defaultCrashHandler()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 23:16:46 +02:00
Ivailo Monev
b447c353a7 kdeui: log error in case neither of the KCrash flags is set
since any message type can be set to log via syslog() that may be the only
way to know when a program without interface (such as service) crashes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 04:23:05 +02:00
Ivailo Monev
ef0dd41a12 kdeui: do not assume XDisplayString() and getenv() return non-null
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 00:45:26 +02:00
Ivailo Monev
aa6b5ea4f0 kinit: klauncher and KCrash rewrite
much simpler and easier to maintain, also it will be proper D-Bus
service now with no sockets, process title hack and whatnot. KCrash
and startkde script (in kde-workspace repo) have to be adjusted for
it tho

note that the internal KIO scheduler already has the functionality to
put slaves on hold but now they will be started as detached process.
eventually they may become plugins (they are loaded as such by kioslave
program) without event loop dispatcher

fixes application startup notification (ASN) and cleanup issues

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-04 23:20:15 +02:00
Ivailo Monev
4a371cc21e Revert "kdeui: remove bogus --kdeinit argument passing from KCrash::defaultCrashHandler()"
This reverts commit a375907865.
2022-11-03 09:54:41 +02:00
Ivailo Monev
a7fc6cd735 kinit: rename exec command definitions
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-01 08:55:13 +02:00
Ivailo Monev
a375907865 kdeui: remove bogus --kdeinit argument passing from KCrash::defaultCrashHandler()
it was ment for kdeinit wrappers but they do not supports such argument

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-01 08:18:29 +02:00
Ivailo Monev
c2c762befe kdeui: adjust KCrash related functions to resource directories changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-06-12 00:32:09 +03:00
Ivailo Monev
13baa7cff4 kdeui: assume PR_SET_PTRACER is defined
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-06-29 00:56:50 +03:00
Ivailo Monev
5d2d39e853 generic: drop support for operating systems Katie does not support
replace internal definitions with Q_OS_<OS> alternatives checks while at it

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-25 04:48:18 +02:00
Ivailo Monev
1324937229 kdeui: sync kcrash copy-paste code with that from kinit
NOTE: openSocket() is modified and preserved as such

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2017-08-02 11:37:37 +00:00
Ivailo Monev
9c5e63ef16 generic: replace socklen_t/kde_socklen_t with QT_SOCKLEN_T
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2016-04-22 13:19:18 +00:00
Ivailo Monev
39ba260d4b generic: misc cleanups 2015-09-22 10:12:39 +00:00
Ivailo Monev
c7a2a17692 yet more windows and mac code remove 2014-11-19 15:30:39 +00:00
Ivailo Monev
b99fa1400b more windows code remove 2014-11-19 15:19:19 +00:00
Ivailo Monev
814163a8dc initial import 2014-11-13 01:04:59 +02:00