From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22059 invoked from network); 8 May 2002 09:59:44 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 8 May 2002 09:59:44 -0000 Received: (qmail 23353 invoked by alias); 8 May 2002 09:59:35 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17088 Received: (qmail 23326 invoked from network); 8 May 2002 09:59:34 -0000 To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: PATCH: zselect builtin. In-reply-to: "Borsenkow Andrej"'s message of "Wed, 08 May 2002 09:36:55 +0400." <6134254DE87BD411908B00A0C99B044F02E89A66@mowd019a.mow.siemens.ru> Date: Wed, 08 May 2002 10:59:05 +0100 Message-ID: <8259.1020851945@csr.com> From: Peter Stephenson Borsenkow Andrej wrote: > 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) > > 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). It's too late: we have stat, the files module, and various other bits which talk to the system in other ways like TCP. Unless we want to move everything around now, I don't see a good reason for putting this anywhere special. (`stat' already clashes with various external commands which do a similar job, unfortunately.) Until then, separate modules for each separate interface seems to me the cleanest way forward. Why is `posix_select' or `sys_select' an improvement over our current mini-convention with the `z', which also covers things which aren't strictly tied to system calls? To me, anyway, it implies a greater tie-in to the underlying system call than you get with the shell builtin --- no fd sets, no maximum fd, no errno handling. This is a distinct difference from perl, which tries to emulate the POSIX interface as closely as possible in such cases. (By the way, there was an interesting note on the Austin group list today that the `error' fd's in the select call are really for exceptions, and the only one currently defined is out-of-band data on a socket. I may point this out, since most select manual pages don't.) > Aso you probably can't fully utilize select without non-blocking I/O. I don't see this; you can already poll a blocking fd using a zero timeout. But some fcntl interface is certainly a possibility. -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 392070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************