Stefan Parvu wrote: > > Wow, I thought you were about to encourage something like: > > - use of the SE Toolkit > > - making libproc a stable interface > > - adding a Sun::Solaris::Proc to Perl > > +1 > Sun::Solaris::Proc might be a nice thing to have in Perl.
I agree... but I hope there would be something like Unix::Proc, too... [snip] > Not sure if having all ptools data into shell would be that of a big > difference, most likely enough big. There will always be folks which > will not use ksh93, used to the old ptools commands as well scripts. Right... but not all people use perl APIs instead of shell scripts either. My idea was to extend the existing mechanisms with tiny bits, not creating a whole new thing. And doing work like making libproc a stable interface is simply to "much" unless we find someone who is employed to do the work (e.g. someone who has really the time to work on it...) ... > How do we ensure backwards compatibility and wouldn't this new model be > a bit more complicated to maintain rather than having ptools separately ? Backwards-compatibilty can be maintained via the way how the current /usr/bin/ksh links it's builtin commands to standalone tools, for example /usr/bin/ulimit is a shell script which looks like this: -- snip -- #!/bin/ksh -p # #ident "@(#)alias.sh 1.2 00/02/15 SMI" # # Copyright (c) 1995 by Sun Microsystems, Inc. # cmd=`basename $0` $cmd "$@" -- snip -- The same stuff could be done for the procsh idea, either looking like this... -- snip -- #!/bin/procsh cmd="$(basename $0)" $cmd "$@" -- snip -- ... (assuming we create a frontend called "/usr/bin/procsh" which loads the ptools builtins from /usr/bin/libproctools.so.1 by default) or... -- snip -- #!/bin/ksh93 cmd="$(basename $0)" builtin -f /usr/bin/libproctools.so.1 "${cmd}" $cmd "$@" -- snip -- (assuming we only create a library called /usr/bin/libproctools.so.1 which contains the builtins commands). A 3rd option is to create binary wrappers which call directly the matching |int b_nameofproctoolcmd(int ac, char *av[], void *context);| from |main()| which would skip the whole Shell_t creation overhead. ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) [EMAIL PROTECTED] \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 7950090 (;O/ \/ \O;) _______________________________________________ perf-discuss mailing list perf-discuss@opensolaris.org