delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/21/23:27:19

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Tue, 21 Jan 2003 23:27:09 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Rolf Campbell <rcampbell AT tropicnetworks DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: sigaction siginfo_t & SIGSEGV
In-Reply-To: <83040F98B407E6428FEC18AC720F5D732DB7A1@exchange.tropicnetworks.com>
Message-ID: <Pine.GSO.4.44.0301212320390.13905-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

On Tue, 21 Jan 2003, Rolf Campbell wrote:

> I'm trying to write an application that can run some code when a certain
> memory address is read or written.
> My first theory was to use mprotect to remove read/write permissions
> from a section and then catch SIGSEGV, but siginfo_t doesn't seem to be
> defined.
> Is hooking a signal using the 'sa_sigaction' member of 'struct
> sigaction' supported in CygWin?
>
> I noticed that struct siginfo_t is declared in sys/signal.h, but inside
> a couple of #ifdef:
> #if defined(__rtems__)
> #if defined(_POSIX_REALTIME_SIGNALS)
>
> And it doesn't have the member that I need anyways (si_addr).
>
> Does anyone know of any other ways of trapping reads/writes to/from
> memory regions?
>
> -Rolf Campbell

No, sigaction is not supported on Cygwin.  It's on the TODO list.

There has been some discussion on how to set up your own signal handler on
this list last October.  See <http://cygwin.com/ml/cygwin/2002-10/msg00236.html>.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019