[Gambas-user] PIPE issues

Demosthenes Koptsis demosthenesk at ...626...
Wed Dec 1 17:55:23 CET 2010


Gambas2 2.21 rev3300

this example is not working in Ubuntu 10.04 AMD64

PUBLIC SUB Main()
  
' Prints the messages sent to a pipe

DIM hFile AS File
DIM sLine AS String

hFile = PIPE "/tmp/FIFO1" FOR INPUT

WHILE NOT Eof(hFile)
  LINE INPUT #hFile, sLine
  PRINT sLine
WEND

END

The pipe is created ok!
But if i make a ls > /tmp/FIFO1

nothing is appeared in console and program terminates.

if i change to
WHILE TRUE

i get the ls results to console and
i get an error

System error. Inappropriate ioctl for device.



-- 
Regards,
Demosthenes Koptsis.





More information about the User mailing list