Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

RE: PATCH: zselect builtin.



> 
> Any comments before I commit this?
> 

If we start adding low-level system interface I really wish that we

- put it in separate module (like Perl POSIX)
- or at least under own hierarchy (like zsh/POSIX/select)

I do not know if POSIX is right here; may be just "system" or just "sys"
would be O.K. meaning zsh/sys/select

In which case it would be nice (as Bart already suggested) to have
standard name pattern; posix_select or sys_select (depending upon level
of system independency we are aiming at).

Aso you probably can't fully utilize select without non-blocking I/O.
The simplest way to add it is using fcntl. Which implies yet another
module (or at least builtin). Non-blocking I/O could be used just fine
currently; just use read-kN and test how much has been read; read should
return 0 if anything has been read, non-zero otherwise.

Hmm ... there does not currently seem to be any way to find out how much
has been written ... sys_write/sys_read?

Otherwise as Bart alrady suggested I prefer has as return with keys FD
numbers.

-andrej



Messages sorted by: Reverse Date, Date, Thread, Author