Re: How to avoid control-c killing the open program?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2009-07-23 at 08:35 -0500, phhs80 wrote:
> On Windows, when I press Control-C the calculations of the program are
> interrupted, but the program is not killed. That is, the key sequence
> to interrupt calculations is Control-C. I am talking about a program
> that runs in a console. 

In POSIX Control-C is assigned to SIGINT, which your program obviously
doesn't catch, and which defaults to terminating the program.

In Windows Control-C defaults to causing a type 23H DOS interrupt - at
least that's what my ancient Borland C 4.x manual says. The default
handler for a 23H interrupt returns zero (stop the program) but the
program can replace the ctrlbrk handler with one that does something
useful to it and then returns non-zero (let the program continue). As
this involves grabbing a hardware interrupt vector I would not be
surprised if Wine doesn't handle it properly.

This mechanism may well be different for the NT-based versions of
Windows so if you haven't tried doing so, what difference does it make
if you set Wine to emulate Win98?

That's as far as my knowledge extends. If setting Wine to Win98 mode
doesn't help, it might be a question for the devs.


Martin




[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux