D16218: [KDevelop/Core]: safe signal-handler implementation (WIP)

Kevin Funk noreply at phabricator.kde.org
Mon Oct 15 12:33:00 BST 2018


kfunk added a comment.


  In D16218#343384 <https://phabricator.kde.org/D16218#343384>, @rjvbb wrote:
  
  > >   If there is no solution which does not require two different code paths for handling this problem, I'm against merging this, non-conformant old behaviour or not, sorry.
  >
  > So to repeat myself: if signal handling should work on MS Windows (and safely so) then the QSocketNotifier approach is off the table, in principle. I cannot (and do not want to) be judge of whether MS Windows should be supported here.
  >
  > The semaphore-based implementation should be more direct as it doesn't go over the Qt event loop and signal/slot mechanism. That makes me inclined to prefer it.
  
  
  I would recommend to just not think about the Windows requirement, if you cannot test it anyway. We did not have support for signal handling on Windows before; and it's not something commonly needed there either. Either way, *if* we would provide that feature, it'd be done via `SetConsoleCtrlHandler` and catching close events (cf. https://docs.microsoft.com/en-us/windows/console/registering-a-control-handler-function). There existing API for this.
  
  Note: Please don't try to incorporate Windows relevant changes in this review; it would bloat it up even more.
  
  > I didn't implement a cmake control over `USE_QSOCKETNOTIFIER`, that should have been enough evidence that it wasn't my intention to keep both code paths.
  
  Why not keep it *simple* and manageable the *first* iteration to begin with? You're giving yourself a hard time...
  
  >  -----
  > 
  > So I should basically convert all static CorePrivate members into global statics?

REPOSITORY
  R32 KDevelop

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

To: rjvbb, #kdevelop, kfunk
Cc: brauch, kfunk, arrowd, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20181015/4d12b8d5/attachment.html>


More information about the KDevelop-devel mailing list