comp.lang.ada
 help / color / mirror / Atom feed
* SIGINT problem under LINUX
@ 2004-06-16  9:29 Radek Kotowicz
  2004-06-16 11:13 ` Jeff C,
  0 siblings, 1 reply; 2+ messages in thread
From: Radek Kotowicz @ 2004-06-16  9:29 UTC (permalink / raw)


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
--



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: SIGINT problem under LINUX
  2004-06-16  9:29 SIGINT problem under LINUX Radek Kotowicz
@ 2004-06-16 11:13 ` Jeff C,
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff C, @ 2004-06-16 11:13 UTC (permalink / raw)



"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.






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-06-16 11:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-16  9:29 SIGINT problem under LINUX Radek Kotowicz
2004-06-16 11:13 ` Jeff C,

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