I think shell.c is used for "fossil sqlite3" mode, not for what I'm
doing. For normal operations, the main() in main.c is invoked, and that
main() doesn't install any kind of interrupt handler.

It looks to me like main.c needs to install a sigint handler, like
shell.c does. I'm going to experiment with that a bit.


On Wed, Dec 14, 2016, at 04:05 AM, Warren Young wrote:
> On Dec 13, 2016, at 4:20 AM, rosscann...@fastmail.com wrote:
> > 
> > I noticed a minor bug in fossil.
> 
> Yeah, I think I agree.
> 
> > I can do some detective work here
> 
> Try this: add 
> 
>     #error Yo!
> 
> on line 891 of src/shell.c, immediately after the ifdef for SIGINT.  I
> think you’ll find that it builds without error, indicating that SIGINT
> isn’t defined, which I believe is because the #include for signal.h is
> being purposely skipped.
> 
> The question is, why?  signal.h is ANSI C, and has been available and
> working under Visual C/C++ for a very long time now.  Decades, probably.
> 
> According to MSDN, Ctrl-C causes SIGINT in console apps just as on Unix:
> 
>   
> https://msdn.microsoft.com/en-us/library/windows/desktop/ms682541(v=vs.85).aspx
> 
> So, try a simple fix if you get this far: remove the conditional
> compilation preventing #include <signal.h> on Windows.
> _______________________________________________
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to