Stopping transmission-daemon properly so it doesnt re-check

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
oh_noes
Posts: 15
Joined: Wed Dec 08, 2010 9:02 am

Stopping transmission-daemon properly so it doesnt re-check

Post by oh_noes »

I'm writing a Solaris SMF script to manage transmission-daemon.

What's the correct and supported way to stop transmission-daemon *cleanly*?

I've seen an example, and it only had kill -9 which isn't very nice. The Linux script uses start-stop-daemon which doesn't tell me the actual command it sends to the process.

Thanks
Jordan
Transmission Developer
Posts: 2312
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Re: Stopping transmission-daemon properly so it doesnt re-ch

Post by Jordan »

There's currently not one. It's slated for 2.20 by ticket https://trac.transmissionbt.com/ticket/3686
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Stopping transmission-daemon properly so it doesnt re-ch

Post by rb07 »

SIGINT and SIGTERM stops the daemon cleanly.

But the "doesn't re-check" is not going to happen, it always checks when it starts up. Think about it, anything could have been changed when it was stopped, it has to check.
raiderG
Posts: 10
Joined: Fri Jan 07, 2011 5:29 pm

Re: Stopping transmission-daemon properly so it doesnt re-ch

Post by raiderG »

rb07 wrote:SIGINT and SIGTERM stops the daemon cleanly.

But the "doesn't re-check" is not going to happen, it always checks when it starts up. Think about it, anything could have been changed when it was stopped, it has to check.
Indeed I've seen that stopping with : kill -15 `pidof transmission-daemon` seems to close the daemon somehow cleanly (2.13)
I usually had many quite large torrents progressing in parallel and 'usually' killing with SIGTERM made a difference in that many more times it closed cleanly without need to recheck. But I think this is not completely implemented
raiderG
Posts: 10
Joined: Fri Jan 07, 2011 5:29 pm

Re: Stopping transmission-daemon properly so it doesnt re-ch

Post by raiderG »

raiderG wrote:
rb07 wrote:SIGINT and SIGTERM stops the daemon cleanly.

But the "doesn't re-check" is not going to happen, it always checks when it starts up. Think about it, anything could have been changed when it was stopped, it has to check.
Actually if you think of the torrent as those many parts that compose a hashed content there should be no way that the other parts change in the meantime. The parts that you get completly are there for good, you just need a "stamp" when reloading transmission that you already got that, and that parts..
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Stopping transmission-daemon properly so it doesnt re-ch

Post by rb07 »

raiderG
Wrong, you didn't understand what I was saying: you can stop the daemon and then move/delete/edit/copy-something-else-into the file, when the daemon starts after wards it has to check, call it sanity-check.
raiderG
Posts: 10
Joined: Fri Jan 07, 2011 5:29 pm

Re: Stopping transmission-daemon properly so it doesnt re-ch

Post by raiderG »

rb07 wrote:raiderG
Wrong, you didn't understand what I was saying: you can stop the daemon and then move/delete/edit/copy-something-else-into the file, when the daemon starts after wards it has to check, call it sanity-check.
Well as it seems it usually it does not do that, otherwise every time when stopping cleanly at restart would do what you said, recheck every bit downloaded. In contrary when you kill it without notice what it does it checks as you said everything, but this obly because as it seems didn't know where it left the last time... What you said though makes some kind of sense though.. because while the torrent is not opened you could mess up with it. Don't know how fast a check could be made to make sure that "mess " didn't happened when daemon restarts. A thing as simple as a timestemp on the file could do the trick and would be no reason for an exhaustive check..
Post Reply