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

Re: PATCH: zselect builtin.



On May 7, 12:25pm, Peter Stephenson wrote:
} Subject: PATCH: zselect builtin.
}
} Here's a builtin to act as a front end to a `select' system call.  The
} name clash with the `select' builtin is unfortunate but seems inevitable

Call it "selectfd" perhaps ... or "sys_select" the way perl does it.

} Any comments before I commit this?

How about a -A (or -H, following `stat') option to store into an assoc?
It might be nice if the keys returned were the FDs and the values were
strings like "rwx" for the state of each descriptor, but if the keys were
"-r", "-w" etc. with strings of space-separated FD numbers as values you
could use `select ${(kv)=replyhash}', so I'm undecided.

(I presume `select $reply' is the reason for the format you chose for the
reply array.)

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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