This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Beat me, whip me, interrupt my program!


Hey, y'all, my company uses cygwin for our build environment, but has not yet
authorized me to use gcc for projects (many of which are multi-threaded), so
I'm still stuck with Visual ScrewedIO.

I do, however, want to be able to use console executables I produce in shell
scripts.  The problem is this:

using windoze 2000 (lord deliver me), cygwin b20

If I use the chain

dbundump -f foo.sql && dbscript -f bar.sql && dbdump -f foo.sql

to modify a database dump, and I control-c the dbundump process, the rest of
the chain continues.  I have tried using the win32 function
SetConsoleCtrlHandler to set a ctrl-c handler, but to no avail.  The handler is
not called when ctrl-c is pressed, if the program is run under bash.  However,
if I run it "cmd /c dbundump" and ctrl-c it, I do see the output produced by my
handler.  

I have called and checked GetConsoleMode(), to see if I inherited something
strange, and it returns 7 (which is normal).  I have tried hooking the signals
unix style, but the signals are not forthcoming either.  They, also, come when
I run under cmd (if my ConsoleCtrlHandler returns ... uhh ... whatever it's
supposed to return to get the signals).  I have done the nt-only
SetConsoleCtrlHandler(0,true) to turn off ignoration of ctrl-c, and having seen
that fail I tried SetConsoleCtrlHandler(0,false) for good measure.  There seems
to be nothing I can do (short of whatever cmd does when IT runs ... my kingdom
for the source) to get the environment I'm running under to look like it's
supposed to.

So this is my last resort ... thank you for your time, and for a product that
reduces my vomit production as a reluctant windoze programmer by about 40%!




--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]