meven added a comment.

  In D25117#565877 <https://phabricator.kde.org/D25117#565877>, @dfaure wrote:
  
  > Nice, I didn't realize the slave had 5 seconds to cleanup after being 
killed, I thought it died immediately
  >  (genericsig_handler in slavebase.cpp).
  
  
  I didn't realize there was a timeout somewhere.
  
  > Hmm, the Windows code is probably a no-op then, there's no signal handler 
there to call setKillFlags(), so no opportunity to cleanup before dying.
  >  Some research indicates that we'd have to use `SetConsoleCtrlHandler` on 
Windows for similar behaviour. 
  >  
https://stackoverflow.com/questions/2007516/is-there-a-posix-sigterm-alternative-on-windows-a-gentle-kill-for-console-ap
  >  
https://danielkaes.wordpress.com/2009/06/04/how-to-catch-kill-events-with-python/
  
  I did not realize that.
  
  > OK so at least it seems feasible, so I won't object to the commit even if 
it doesn't implement it on Windows.
  
  This would be a regression in Windows, because of the code removal in 
`filecopyjob.cpp`.
  I need to implement signal handling for windows starting at 
`KIOPrivate::sendTerminateSignal` in `kioglobal_p_win.cpp`. currently it simply 
kills directly the process. and use `SetConsoleCtrlHandler` as you suggested to 
fix this.
  Or add a `#ifdef Q_OS_WIN` block in filecopyjob.cpp.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D25117

To: meven, #frameworks, dfaure, ngraham, apol
Cc: apol, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

Reply via email to