* Asynchronous abort not working in Debian GNAT?
@ 2009-07-15 18:32 Niklas Holsti
2009-07-15 19:35 ` Georg Bauhaus
0 siblings, 1 reply; 2+ messages in thread
From: Niklas Holsti @ 2009-07-15 18:32 UTC (permalink / raw)
Under Debian Sarge on Intel, gnat 3.15p, I implemented a time-out for an
application using the canonical construct:
select
delay Time_Out;
Error (...);
then abort
Processing (...);
end select;
After upgrading to Debian Lenny, FSF GNAT 4.3.2, it appears that this no
longer works; instead, Processing completes without being aborted,
unless Processing does something that probably invokes scheduling, for
example "delay 0.0" or Text_IO output to the console.
Running "strace" on the program shows that a SIGABRT is signalled at
TIme_Out, but does not abort Processing until Processing does something
like delay or console output. The GNAT polling option (-gnatP) does not
seem to help.
I did not find any Debian bug report on this issue. Has anyone else seen
this? Do you know of work-arounds? Other than sprinkling the code with
frequent delay statements.
--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Asynchronous abort not working in Debian GNAT?
2009-07-15 18:32 Asynchronous abort not working in Debian GNAT? Niklas Holsti
@ 2009-07-15 19:35 ` Georg Bauhaus
0 siblings, 0 replies; 2+ messages in thread
From: Georg Bauhaus @ 2009-07-15 19:35 UTC (permalink / raw)
Niklas Holsti wrote:
> Under Debian Sarge on Intel, gnat 3.15p, I implemented a time-out for an
> application using the canonical construct:
>
> select
> delay Time_Out;
> Error (...);
> then abort
> Processing (...);
> end select;
>
> After upgrading to Debian Lenny, FSF GNAT 4.3.2, it appears that this no
> longer works; instead, Processing completes without being aborted,
> unless Processing does something that probably invokes scheduling, for
> example "delay 0.0" or Text_IO output to the console.
FWIW, with Windows GNAT GPL 2007 (gcc 4.1.3), it doesn't abort either,
with Ada.Text_IO;
procedure Time_Out is
procedure Processing is
type T is mod 2**16;
X: T;
begin
Very_Busy: loop
X := T'Succ(X);
end loop Very_Busy;
end Processing;
procedure Error(Message: String) is
use Ada;
begin
Text_IO.Put_Line(Text_Io.Current_Error,
MEssage);
end Error;
begin
select
delay 10.0;
Error("over");
then abort
Processing;
end select;
end Time_Out;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-15 19:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-15 18:32 Asynchronous abort not working in Debian GNAT? Niklas Holsti
2009-07-15 19:35 ` Georg Bauhaus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox