source: vendor/bash/3.1-p17/examples/loadables/README

Last change on this file was 3228, checked in by bird, 18 years ago

bash 3.1

File size: 1.5 KB
Line 
1Some examples of ready-to-dynamic-load builtins. Most of the
2examples given are reimplementations of standard commands whose
3execution time is dominated by process startup time. The
4exceptions are sleep, which allows you to sleep for fractions
5of a second, finfo, which provides access to the rest of the
6elements of the `stat' structure that `test' doesn't let you
7see, and pushd/popd/dirs, which allows you to compile them out
8of the shell.
9
10All of the new builtins in ksh93 that bash didn't already have
11are included here, as is the ksh `print' builtin.
12
13The configure script in the top-level source directory uses the
14support/shobj-conf script to set the right values in the Makefile,
15so you should not need to change the Makefile. If your system
16is not supported by support/shobj-conf, and it has the necessary
17facilities for building shared objects and support for the
18dlopen/dlsyn/dlclose/dlerror family of functions, please make
19the necessary changes to support/shobj-conf and send the changes
20to bash-maintainers@gnu.org.
21
22Loadable builtins are loaded into a running shell with
23
24 enable -f filename builtin-name
25
26enable uses a simple reference-counting scheme to avoid unloading a
27shared object that implements more than one loadable builtin before
28all loadable builtins implemented in the object are removed.
29
30Many of the details needed by builtin writers are found in hello.c,
31the canonical example. There is no real `builtin writers' programming
32guide'. The file template.c provides a template to use for creating
33new loadable builtins.
Note: See TracBrowser for help on using the repository browser.