summaryrefslogtreecommitdiff
path: root/quickexec/johns/README
authorkergoth <kergoth>2002-01-25 22:14:26 (UTC)
committer kergoth <kergoth>2002-01-25 22:14:26 (UTC)
commit15318cad33835e4e2dc620d033e43cd930676cdd (patch) (unidiff)
treec2fa0399a2c47fda8e2cd0092c73a809d17f68eb /quickexec/johns/README
downloadopie-15318cad33835e4e2dc620d033e43cd930676cdd.zip
opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.gz
opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.bz2
Initial revision
Diffstat (limited to 'quickexec/johns/README') (more/less context) (ignore whitespace changes)
-rw-r--r--quickexec/johns/README21
1 files changed, 21 insertions, 0 deletions
diff --git a/quickexec/johns/README b/quickexec/johns/README
new file mode 100644
index 0000000..1af84dc
--- a/dev/null
+++ b/quickexec/johns/README
@@ -0,0 +1,21 @@
1
2Compile qinit_srv.c to qinit_srv as usual
3Compile your applications at shared libraries instead of as executables:
4 eg: gcc test.c -o test.so -shared
5Make a symbolic link from qinit_srv to the name of the application:
6 eg: ln -s qinit_srv test
7Now make sure 'test' (The symlink) and 'test.so' (the shared library version of the app) are together.
8When you run ./test it will load test.so and run it just like you were running the application for real.
9There will be a qinit_srv process created the first time you run a program this way.
10
11How it works:
12
13qinit_srv checks to see if there is already a server, if not it starts as a server which runs in the background as a deamon.
14If it's a server it loads all the libraries listed in the library.lst file.
15It then waits for signals to be sent to it which tell it to fork itself and load shared libraries and run them.
16If it decides it's not the server, it sends a signal to the server to run the given command.
17The server then executes a shared object file of whatever name the original process is invoked as (argv[0], the symlink trick)
18The other process waits until the forked server finishes and signals the original process that it as finished and to return
19
20
21