Mail Archives: cygwin/2000/02/03/18:21:15
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
|
List-Subscribe: | <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
|
List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/>
|
List-Post: | <mailto:cygwin AT sourceware DOT cygnus DOT com>
|
List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
|
Sender: | cygwin-owner AT sourceware DOT cygnus DOT com
|
Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com
|
From: | Chris Faylor <cgf AT cygnus DOT com>
|
Date: | Thu, 3 Feb 2000 18:26:21 -0500
|
To: | "Fifer, Eric" <EFifer AT sanwaint DOT com>
|
Cc: | "'Ray Easton'" <ray DOT easton AT wcom DOT com>, cygwin AT sourceware DOT cygnus DOT com
|
Subject: | Re: call_handler, interrupt_now and interruptible
|
Message-ID: | <20000203182621.B2383@cygnus.com>
|
Mail-Followup-To: | "Fifer, Eric" <EFifer AT sanwaint DOT com>,
|
| 'Ray Easton' <ray DOT easton AT wcom DOT com>, cygwin AT sourceware DOT cygnus DOT com
|
References: | <779F20BCCE5AD31186A50008C75D99791716D3 AT SILLDN_MAIL1>
|
Mime-Version: | 1.0
|
X-Mailer: | Mutt 1.0i
|
In-Reply-To: | <779F20BCCE5AD31186A50008C75D99791716D3@SILLDN_MAIL1>; from EFifer@sanwaint.com on Thu, Feb 03, 2000 at 06:38:43PM -0000
|
On Thu, Feb 03, 2000 at 06:38:43PM -0000, Fifer, Eric wrote:
>
>"Ray Easton" writes:
>>> Anyways, is this dangerous to do?
>>
>>If 'this' means interrupting a DLL while it is "paused on a system
>>call", yes, it is extermely dangerous and can leave the NT kernel in a
>>corrupt state. (This has nothing to do with Cygwin -- this is purely
>>an NT issue.)
>
>Actually, by 'this' I meant comment out 'pchigh == 0x60000000'. And,
>when I wrote 'system call' I meant a Cygwin system call like read, but
>since most things are emulated on top of Win32 calls, eventually there
>might be a Win32 call like ReadFile. AFAICT, Cygwin signals are emulated
>with Win32 threads and semaphores. A Cygwin process has a "sig" thread
>and a "main" thread, when a signal is sent, the "sig" thread receives it,
>does a SuspendThread on the "main" thread and does a GetThreadContext,
>if it is "interruptible" the context is changed and the signal handler
>is pushed on the stack and the new context is set with SetThreadContext
>then followed by a ResumeThread. I can see how this could be dangerous
>although I'm fairly ignorant of Win32, so I'm not sure exactly what you
>can do that will leave the NT kernel in a corrupt state.
The answer to your question is that this *is* dangerous to do. It allows
cygwin "system calls" to be interrupted.
The code that you are investigating is essentially a stopgap until such
time as I have time to make it more foolproof.
As you've discovered, if you are using a snapshot, you're living on the
edge.
cgf
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -