On 9/26/2017 8:18 PM, Craig A. Berry wrote:
> On 9/26/17 2:38 PM, Arne Vajhøj wrote:
>> On 9/26/2017 2:45 PM, Craig A. Berry wrote:
>>> It's doing a $QIO to SYS$COMMAND, but it's got a pair of sockets
>>> shimmed in front, presumably to be able to play nice with the select()
>>> in the top-level code. As far as I can see, there is no provision in the
>>> VMS-specific code to detect an EOF condition and propagate it to the
>>> mainline code. But do check for yourself. See:
>>>
>>> apps/vms_term_sock.c: TerminalSocket
>>> apps/apps.c: fileno_stdin
>>> apps/apps.c: raw_read_stdin
>>>
>>> at:
>>>
>>> <
https://github.com/openssl/openssl>
>>
>> SYS$QIO(W) is device dependent, so all attempts to
>> assign/define from terminal to a file will fail.
>>
>> Usual (?) workaround is to run the problematic
>> program in a separate process attached to
>> a pseudo terminal (PTD$ routines) and get the file input
>> send over to that.
>
> Wouldn't it be easier to:
>
> 1.) Detect whether SYS$COMMAND is a file or device.
> 2.) If device, call $ASSIGN, else call $OPEN.
> 3.) Use channel from #2 for $QIO.
>
> ?