This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Gracefully handle SIGTERM?

Tags: None
(comma "," separated)
jdong
Registered Member
Posts
358
Karma
0

Gracefully handle SIGTERM?

Thu Jan 04, 2007 6:55 pm
Sometimes I need to exit KTorrent remotely from a ssh login. The only way I've figured for doing that is killall, as nothing else works reliably.

When exiting by SIGTERM, KTorrent just promptly aborts uncleanly.

Could sigterm instead try to be more graceful, synonymous with a standard exit?
J
Registered Member
Posts
86
Karma
0

Re: Gracefully handle SIGTERM?

Thu Jan 04, 2007 7:37 pm
jdong wrote:Sometimes I need to exit KTorrent remotely from a ssh login. The only way I've figured for doing that is killall, as nothing else works reliably.

When exiting by SIGTERM, KTorrent just promptly aborts uncleanly.

Could sigterm instead try to be more graceful, synonymous with a standard exit?


A standard exit could probably take too long, and something might send it a SIGKILL instead. Why not use DCOP to shut it down via ssh, or use the ktorrent ktshell interface if that enables to shut it down?


Thank you KTorrent developers! :)
_________________
"Thou shalt not steal." - STOP PIRACY NOW!
jdong
Registered Member
Posts
358
Karma
0

Thu Jan 04, 2007 7:49 pm
Because as I said, I can't get dcop to work reliably when logging in via SSH. Sometimes it just says "found dcop server" and exits.
J
Registered Member
Posts
86
Karma
0

Thu Jan 04, 2007 10:19 pm
jdong wrote:Because as I said, I can't get dcop to work reliably when logging in via SSH. Sometimes it just says "found dcop server" and exits.


Nope, you didn't say that before. Anyway... why not get it working then?

So, not even ktshell works?

What exit code does dcop have? (try "dcop arguments to dcop; echo $?")

Have you tried the --user and --session parameters for dcop? (see --help for further info)


Thank you KTorrent developers! :)
_________________
"Thou shalt not steal." - STOP PIRACY NOW!
jdong
Registered Member
Posts
358
Karma
0

Fri Jan 05, 2007 1:28 am
http://ktorrent.org/forum/viewtopic.php?p=6897#6897

I made that comment in another thread, I'll investigate it more when I get a chance.

I don't think that a prolonged SIGTERM handler can be that fatal, Squid for instance takes its leisurely time terminating and that's never caused that much trouble.

Most killall shutdowns scripts wait at least 15 seconds before resorting to SIGKILL anyway.

Using a different handler like USR1/USR2/HUP is perfectly fine too, I just want some more primitive way of telling ktorrent to gracefully exit.
George
Moderator
Posts
5421
Karma
1

Sat Jan 06, 2007 2:22 pm
How about we add a shutdown button to the webgui ?
User avatar
bassmadrigal
Registered Member
Posts
113
Karma
0

Sun Jan 07, 2007 1:23 pm
George wrote:How about we add a shutdown button to the webgui ?


I like that idea. It would be very handy.

Jeremy
jdong
Registered Member
Posts
358
Karma
0

Sun Jan 07, 2007 11:53 pm
yes, that'd be very helpful


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]