Hi,

I am experiencing the following behaviour, which I am unable to explain even after having read and re-read the IO chapter in the UNIX programming guide.

The problem is that when opening a PIPE device in read/write mode with the 'fixed' device parameter, I am receiving an error on the read following a call to 'write /eof'.  That said, if I ignore the error, everything else works file.  If I remove the 'fixed' device parameter, no error is produced.

With error :
$ gtm
GTM>set data="12345"
GTM>set cmd="cat"
GTM>open cmd:(command="cat":fixed:wrap)::"PIPE"
GTM>use cmd
GTM>write data
GTM>write /eof
GTM>read buffer
%SYSTEM-E-ENO9, Bad file descriptor
GTM>use $p
GTM>write buffer
GTM>use cmd
GTM>read buffer
GTM>use $p
GTM>write buffer
12345
GTM>close cmd
GTM>h

No error:
$ gtm
GTM>set data="12345"
GTM>set cmd="cat"
GTM>open cmd:(command="cat":wrap)::"PIPE"
GTM>use cmd
GTM>write data
GTM>write /eof
GTM>read buffer
GTM>use $p
GTM>write buffer
12345
GTM>close cmd
GTM>h

This is using "GT.M V5.5-000 Linux x86", installed from the binary tarball (/usr/lib/fis-gtm/V5.5-000_x86_64/), on Sabayon Linux.

Now, I don't understand why this error happens, or what I should do to prevent it.  A quick & dirty hack I am using is to trap and ignore the error, but that isn't really the way to go...  So any pointer to what I am doing wrong would be appreciated.

Thanks,
Laurent