[Info-vax] Timeout in a write using QUIW.
Dave Froble
davef at tsoft-inc.com
Wed Jun 21 19:16:10 EDT 2023
On 6/21/2023 5:17 PM, Arne Vajhøj wrote:
> On 6/21/2023 4:45 PM, Jan-Erik Söderholm wrote:
>> When doing a *read* from a terminal device using QIOW, one
>> can use IO$M_TIMED and supply a timeout value in P3. That
>> works perfectly and we use that a lot.
>>
>> Now, we are having issues with an application when *writing*
>> to a terminal (TNA) device using QUIW that points to a small
>> label printer. If the printer is offline or not accessable on
>> the network, the application just hangs.
>>
>> As far as I can see, QIO/QIOW does not support a timeout value
>> when used for writing, is that correct?
>
> Yes.
>
> https://vmssoftware.com/docs/VSI_IO_REF.pdf
>
> Table 5.6 lists IO$M_TIMED for IO$_READ* while table 5.8
> does not list it for IO$_WRITE*.
>
>> I was hoping that one could add a timeout value just as in the
>> read case, but it doesn't look so. So I do not see how to get
>> out of the hanging call to QIOW. Maybe using QIO, and doing
>> some extra coding to check the I/O, I guess.
>>
>> So, is there a way to get out of this state, still using QIOW?
>
> Totally untested idea:
>
> SYS$SETIMR with an AST routine that calls SYS$CANCEL
>
> Arne
>
>
Damn, Arne beat me to it. However while I use that for reads, I've never used
it for a write. Don't know what would happen. Best to test.
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
More information about the Info-vax
mailing list