summaryrefslogtreecommitdiff
path: root/examples/loadables/README
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2007-11-12 13:06:02 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2007-11-12 13:06:02 -0800
commitb7fc9e0f6d6105ba2203f219743d4b269415e84b (patch)
treeef6586dfc62798c2b17487b443864699aca55f31 /examples/loadables/README
downloadvyatta-bash-b7fc9e0f6d6105ba2203f219743d4b269415e84b.tar.gz
vyatta-bash-b7fc9e0f6d6105ba2203f219743d4b269415e84b.zip
initial import from bash_3.1dfsg.orig.tar.gz
Diffstat (limited to 'examples/loadables/README')
-rw-r--r--examples/loadables/README33
1 files changed, 33 insertions, 0 deletions
diff --git a/examples/loadables/README b/examples/loadables/README
new file mode 100644
index 0000000..db67860
--- /dev/null
+++ b/examples/loadables/README
@@ -0,0 +1,33 @@
+Some examples of ready-to-dynamic-load builtins. Most of the
+examples given are reimplementations of standard commands whose
+execution time is dominated by process startup time. The
+exceptions are sleep, which allows you to sleep for fractions
+of a second, finfo, which provides access to the rest of the
+elements of the `stat' structure that `test' doesn't let you
+see, and pushd/popd/dirs, which allows you to compile them out
+of the shell.
+
+All of the new builtins in ksh93 that bash didn't already have
+are included here, as is the ksh `print' builtin.
+
+The configure script in the top-level source directory uses the
+support/shobj-conf script to set the right values in the Makefile,
+so you should not need to change the Makefile. If your system
+is not supported by support/shobj-conf, and it has the necessary
+facilities for building shared objects and support for the
+dlopen/dlsyn/dlclose/dlerror family of functions, please make
+the necessary changes to support/shobj-conf and send the changes
+to bash-maintainers@gnu.org.
+
+Loadable builtins are loaded into a running shell with
+
+ enable -f filename builtin-name
+
+enable uses a simple reference-counting scheme to avoid unloading a
+shared object that implements more than one loadable builtin before
+all loadable builtins implemented in the object are removed.
+
+Many of the details needed by builtin writers are found in hello.c,
+the canonical example. There is no real `builtin writers' programming
+guide'. The file template.c provides a template to use for creating
+new loadable builtins.