[Gambas-user] Pipe doesn't receive contents
    Benoît Minisini 
    gambas at ...1...
       
    Sat May  8 22:33:06 CEST 2010
    
    
  
> 
> Then I admit that Eof() is not useful for pipes (and other special
> streams), so maybe I should make Eof() more clever:
> 
> - If the stream is in non-blocking mode, do as before, i.e. check that
> something can be read.
> 
> - If the stream is in blocking mode, try to just read a byte, and remember
> it. That way, if we were really at the "end of file" (or pipe closed for
> pipes, etc.), we get a system error that we can transform in gambas "end
> of file". Otherwise we block until a character arrives.
> 
> I will try that and see if then Eof() will behave a bit like feof().
> 
Hi,
I have modified the behaviour of Eof() that way in revision #2940. Now it 
should work as intelligently as feof(), even more. (for example, if you open a 
void file, feof() will return FALSE, where Eof() will return TRUE).
If anybody using processes, sockets, or other non-file streams get unexpected 
behaviours, please tell me!
Regards,
-- 
Benoît Minisini
    
    
More information about the User
mailing list