comp.lang.ada
 help / color / mirror / Atom feed
From: "Martin Dowie" <martin.dowie@baesystems.com>
Subject: Re: Catching Ctrl-C SIGINT
Date: Mon, 17 Jan 2005 14:19:51 -0000
Date: 2005-01-17T14:19:51+00:00	[thread overview]
Message-ID: <41ebc7fc_1@baen1673807.greenlnk.net> (raw)
In-Reply-To: csgasv$2u3$1@fsuj29.rz.uni-jena.de

Christopher Broeg wrote:
[snip]
> Here the problem:
> I do get the message
> "Interrupt SIGINT caught. sending signal "
> but the signal_public procedure never manages to send the signal. I
> don't know why. If I call the signal_public procedure from test1 it
> works, but is of course useless.
>
> Can you give me any hints on what I am doing wrong? I am lost.
>
> Maybe there is a better way to react upon the interrupt? But still I
> am wondering why my solution is not working.

Not a good idea to call "Put_Line" from a protected object as it is a
(potentially blocking call).

Take out the "Put_Lines" and increment an unprotected unsigned integer
instead and from within a task poll say @1Hz and look for the integer
changing - i.e. try an look for a side-effect of the protected object doing
its job. You can always remove this task once you're convinced all is ok.

Cheers

-- Martin






  reply	other threads:[~2005-01-17 14:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-17 12:26 Catching Ctrl-C SIGINT Christopher Broeg
2005-01-17 14:19 ` Martin Dowie [this message]
2005-01-17 14:35   ` Christopher Broeg
2005-01-17 21:37 ` Simon Wright
  -- strict thread matches above, loose matches on Subject: below --
2005-01-17 14:07 Christopher Broeg
2005-01-17 14:13 Christopher Broeg
replies disabled

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