cc: Joerg.Schilling at fokus.fraunhofer.de
Subject: Re: Re: [ksh93-integration-discuss] Any prebuilt package
--------

> Note that some time ago, I tried to find out how it might be possible to
> let ksh93 use libfind. From our discussions at ODDEVCON, it turns out that
> we would need two separate wrapper sourcefiles. One compiled against sfio
> and the other compiled against stdio:
> 
> 

There is another way.  On each system we generate an intercept
library that maps stdio calls into sfio calls.  Currently this
library is not linked into ksh93 because ksh93 doesn't use stdio.
However, if ksh93 were built with this library, or if a dynamic
version of this library were mapped in with builtin -f, then it
should be possible to run built-ins that were compiled against
stdio. 

However, the builtins would still have to handle cleanup correctly
and allow the shell to check for signals periodically.
There are a couple of methods of doing this which are not
fully documented although there are examples in libcmd.

However, the recommended way to do builtins is to include
<shell.h> and link with ast.  This way stdio calls will
be mapped to sfio calls at compile time and several
other calls (for example open) will be intercepted so
that special /dev/... types not recognized by the OS like /dev/tcp
will be supported.

David Korn
dgk at research.att.com

Reply via email to