[Gambas-user] Happy new year...

Jussi Lahtinen jussi.lahtinen at ...626...
Fri Jan 2 01:49:01 CET 2015


>         Shell "echo test > " & sTemp Wait
>
> does not emit any event, as its underlying Process object has no event
> name.
>

I still don't get it. I re-read the documentation and it says:

If the WATCH keyword is specified, the file is watched by the interpreter
via the select(2) system call :
If at least one byte can be read from the file, then the event handler
File_Read() is called.
If at least one byte can be written into the file, then the event handler
File_Write() is called.


So, line:
hWatchFile = Open sTemp For Read Watch

Means file sTemp is watched for bytes to be read.

And this writes "test" to the watched file:
Shell "echo test > " & sTemp Wait

And there is File_Read() event handler declared.

Also this works as expected (/dev/zero has always zeroes for reading):
hWatchFile = Open "/dev/zero" For Read Watch

So, what exactly is missing the event name?


Jussi



More information about the User mailing list