indygreg requested changes to this revision.
indygreg added a comment.
This revision now requires changes to proceed.


  I agree with @yuja that we should move this to `util.py` or one of its 
siblings and rename it to `uninterruptable` or some such.
  
  That being said, signal handlers are process global. And we do need to 
maintain persistent state so things don't get out of whack if we have 
overlapping calls, potentially from multiple threads (e.g. in the case of 
hgweb). So maybe `ui.py` - or even a global variable in that module - is the 
proper place for such state.
  
  Also, I wonder if we shouldn't delay signal handling instead of ignoring it. 
e.g. our new signal handler would print that the signal was received and then 
`raise KeyboardInterrupt` at context manager exit time. Otherwise, the handling 
of `SIGINT` is timing dependent and doesn't consistently result in an aborted 
process.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3716

To: durin42, #hg-reviewers, indygreg
Cc: indygreg, yuja, martinvonz, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to