[Coco] signal/intercept routine in Basic09

Aaron Wolfe aawolfe at gmail.com
Sat Jan 23 20:24:05 EST 2010


It's probably worth noting that the "port closed" signal is not a part
of standard OS-9, it is a feature of the DriveWire additions we're
working on.  The signal's value is 4.  It is sent to a process when
the remote end of a TCPIP connection closes.

On Sat, Jan 23, 2010 at 7:51 PM, Wayne Campbell <asa.rand at gmail.com> wrote:
> I can't say what every signal the process expects to receive is, but I do
> know one. It's the signal for port closed. If the port I've opened in the
> irc client gets closed, ccirc does not know it and continues to try to write
> to the open path. Before that, the program drops into debug. If it was
> packed, it would just end the process.
>
> I'm not certain that this is all I need to address, since at some point I
> want to add a windowing environment for the user interface, and will need to
> be dealing with whatever signals I can expect from that, like mouse clicks
> and such. Is there any such thing as a "generic" handler that will allow me
> to process all trappable signals not trapped with ON ERROR GOTO?
>
> BTW, I do have an error trap, and the closed port signal bypasses it and
> goes straight to debug.
>
> Wayne
>
> ----- Original Message ----- From: "Robert Gault"
> <robert.gault at worldnet.att.net>
> To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
> Sent: Saturday, January 23, 2010 4:31 PM
> Subject: Re: [Coco] signal/intercept routine in Basic09
>
>
>> Wayne Campbell wrote:
>>>
>>> It seems strange that Basic09 includes ON ERROR GOTO for trapping errors,
>>> but does not include something like ON SIGNAL, OR INTERCEPT, or ON BREAK for
>>> trapping signals. Errors, not caught with ON ERROR GOTO cause Basic09 to
>>> drop into debug mode. Signals also cause Basic09 to drop into debug mode.
>>> Why aren't they trappable? I don't know.
>>>
>>> I have been looking at F$Icpt. I have also looked in the C manual at
>>> intercept() and signal(). Since F$Icpt is the only system call I can find,
>>> and since signal() and intercept() are incompatible, I take that to mean
>>> both use the F$Icpt call, and deal with it differently.
>>>
>>> Has anyone here ever written a signal trap or intercept routine for
>>> Basic09? Does anyone here have a clue how to write one? I need to be able to
>>> trap all signals that are not fatal to the process. Of course, there are
>>> some that cannot be trapped, and that's OK, so long as I can trap the rest.
>>>
>>> Wayne
>>>
>>
>> Wayne,
>> It would help to know what is sending the signals to Basic09, what the
>> signals are going to report, and just how many of these are to be sent.
>>
>> Depending on the type of signals, there just might be a way to use ON
>> ERROR GOTO.
>>
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> http://five.pairlist.net/mailman/listinfo/coco
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>



More information about the Coco mailing list