ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-users: Re: [Ethereal-users] How to terminate tethereal from a tcl progra m on Windows?

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Fri, 28 Jun 2002 03:09:09 -0700
On Tue, May 28, 2002 at 05:46:32PM +0100, Alistair.McGlinchy@xxxxxxxxxxxxxxxxxxxxx wrote:
> This may not be the same problem as you, but a work colleague and I have
> been having continuing problems with Ctrl-Break and Ctrl-C handling and
> tethereal since version 0.9 came out.

I've just checked in a fix for the exception.  (The problem is that the
handlers for Ctrl-Break and Ctrl-C run in a separate thread, but the
handlers are doing a "longjmp()", which is longjmping to a frame in the
main thread's stack, which is not legal.)

That fix should be in the next release.

> Ctrl-Break halts tethereal immediately without allowing it to flush its file
> buffers.

Another part of the fix should cause the handler to handle Ctrl-Break as
well as Ctrl-C (I'm using the native "catch a console signal" API rather
than the UNIX-wrapper "signal(SIGINT, ...)" call, so it catches a number
of termination signals).

> A search on
> google for 0xc0000029 shows that other Perl and Ruby based apps also seem to
> have this problem with Ctrl-C .

("Other" Perl and Ruby-based apps?  Ethereal is neither Perl-based nor
Ruby-based.)

It may be that the Perl and Ruby interpreters are doing the same
"longjmp from a SIGINT handler" thing, which *is* legal in UNIX signal
handlers and is thus done in UNIX applications.  Unfortunately, it
causes crashes in Windows.