comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeff C," <jcreem@yahoo.com>
Subject: Re: SIGINT problem under LINUX
Date: Wed, 16 Jun 2004 11:13:45 GMT
Date: 2004-06-16T11:13:45+00:00	[thread overview]
Message-ID: <IXVzc.62345$Sw.23273@attbi_s51> (raw)
In-Reply-To: 51bc4db.0406160129.7cb72fb8@posting.google.com


"Radek Kotowicz" <kor@li.pl> wrote in message
news:51bc4db.0406160129.7cb72fb8@posting.google.com...
> Hi,
>  I'm facing the following problem. I have written a signal handler for
> SIGINT and a few other signals. The program performs as expected when
> I type CTRL+C, but somehow the signal isn't handled or delivered when
> I issue `kill -s SIGINT <pid>`. There is only one process of my app
> running.
> Is there at all any way the program can infer what does the signal
> come from - I guess it cannot carry any extra info with it.
> Does anyone have any clue what the problem is?
>
> Thanx in advance,
> Radek Kotowicz
> --


Though it does not sound like the exact problem that you are seeing, it is
probably work a re-read of the GNAT RM and one of the GNAT header files to
see if you can gleen any useful information from it.


pragma Unreserve_All_Interrupts
Syntax:
          pragma Unreserve_All_Interrupts;
          Normally certain interrupts are reserved to the implementation.
Any attempt to attach an interrupt causes Program_Error to be raised, as
described in RM C.3.2(22). A typical example is the SIGINT interrupt used in
many systems for an Ctrl-C interrupt. Normally this interrupt is reserved to
the implementation, so that Ctrl-C can be used to interrupt execution.

If the pragma Unreserve_All_Interrupts appears anywhere in any unit in a
program, then all such interrupts are unreserved. This allows the program to
handle these interrupts, but disables their standard functions. For example,
if this pragma is used, then pressing Ctrl-C will not automatically
interrupt execution. However, a program can then handle the SIGINT interrupt
as it chooses.

For a full list of the interrupts handled in a specific implementation, see
the source code for the specification of Ada.Interrupts.Names in file
a-intnam.ads. This is a target dependent file that contains the list of
interrupts recognized for a given target. The documentation in this file
also specifies what interrupts are affected by the use of the
Unreserve_All_Interrupts pragma.






      reply	other threads:[~2004-06-16 11:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-16  9:29 SIGINT problem under LINUX Radek Kotowicz
2004-06-16 11:13 ` Jeff C, [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox