Add -a DELAY_TIME, SIGTERM delayment feature#253
Add -a DELAY_TIME, SIGTERM delayment feature#253qirlib wants to merge 3 commits intorfjakob:masterfrom
Conversation
| return; | ||
| } | ||
|
|
||
| const size_t stringc_len = strlen("string:"); |
There was a problem hiding this comment.
This would alarm SCA because of the \0.
|
Yeah, the Codacy issue. Am I supposed to do something about that? Its reason for "Not up to standards. This pull request quality could be better." is kind of off. @CanNuhlar And, yes, just in case, so one does not have to verify it oneself: that code line is |
It's just that Codacy requires you to link your GitHub account with a permission to |
|
Codacity says
which is ridiculous for a string literal. Ignore. |
| // given that SIGTERM window can be passed rather quickly, | ||
| // make one small attempt to terminate process gracefully; | ||
| // kill_wait() will quickly escalate to SIGKILL anyway | ||
| kill_process(args, SIGTERM, victim); |
There was a problem hiding this comment.
Sorry, I glitched out and have had misread kill_wait(): this does not really make much sense. This line should either be just kill_process(args, sig, victim); or I'll possibly add a single adaptive sleep to not dip too deep into SIGKILL territory. I'm a bit busy now, so it might take a while on my end.
|
Yeah, totally agreed on \0. Just wanted to point out guys :) |
|
Some general questions:
|
|
Sorry for leaving this hanging.
The thing is, when I read
, something clicked in my head; I have realized a persistent, updatable warning-notification would be even better. There are also issues like GNOME 3 does not display notifications over fullscreen windows unless While I'm at that, and since it kind-of fits here, are you okay with libdbus? It's effectively GPLv2+. sd-bus is a very nice, but is also a hard dependency on systemd; gdbus is LGPLv2.1+, but it is fat: $ size --format=GNU libdbus-1.so
text data bss total filename
186653 129311 528 316492 libdbus-1.so
$ size --format=GNU --totals libgio-2.0.so libglib-2.0.so libgobject-2.0.so
text data bss total filename
1123006 821568 7680 1952254 libgio-2.0.so
539914 659943 3112 1202969 libglib-2.0.so
220294 160293 2792 383379 libgobject-2.0.so
1883214 1641804 13584 3538602 (TOTALS)Not to mention |
|
(1) Ok, I see, thanks! (2) Unfortunately, there seems to be no sane way to send GUI notifications directly from a service. You could, however, extend the https://github.com/rfjakob/systembus-notify API to do what you need ( |
|
PS: before dbus-send and systembus-notify, we had this, but I don't want to go there again ;) |
A new option, with a functionality of:
There is also a small refactoring of
notify().