On Mon, Jul 8, 2013 at 8:00 PM, David Korn <[email protected]> wrote: > cc: [email protected] > Subject: Re: Re: (Final ?!) Patch to get ast-ksh.2013-06-28 working on > Solaris 11-8+old Linux (SuSE 9.3) / was: Re: [ast-developers] Patch to get > ast-ksh.2013-06-28 working on Solaris 11... / was: Re: AT&T Software > Technology ast alpha software download update > >> David: There are several places (and we get more soon) where >> |fd=sh_fcntl(fd, F_dupfd_cloexec, 10)| is used to register a |fd| with >> the shell (preferably outside the 0-9 fd range) ... IMO it would be >> usefull to have a seperate function for it (to centralise the >> functionality, avoid confusion with |fcntl()| and other issues) ... >> which would be the preferred name: |sh_dupshfd()|, |sh_regfd()| ... ? >> :-) > > sh_fcntl() is a separate function from fcntl().
I know... my point was to create a seperate API function which registeres a fd with the current Shell_t object and moves it outside the 0-9 fd range reserved for POSIX shell fds. This is the same as |fd=sh_fcntl(fd, F_dupfd_cloexec, 10)| does... but a seperate API function would centralise this "register-and-move-to-safe-fd-number"-functionality. This should mainly be used by libshell plugins which want to obtain their own fds and use it at shell script level... ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) [email protected] \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;) _______________________________________________ ast-developers mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-developers
