summaryrefslogtreecommitdiff
path: root/quickexec/johns/README
Side-by-side diff
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 @@
+
+Compile qinit_srv.c to qinit_srv as usual
+Compile your applications at shared libraries instead of as executables:
+ eg: gcc test.c -o test.so -shared
+Make a symbolic link from qinit_srv to the name of the application:
+ eg: ln -s qinit_srv test
+Now make sure 'test' (The symlink) and 'test.so' (the shared library version of the app) are together.
+When you run ./test it will load test.so and run it just like you were running the application for real.
+There will be a qinit_srv process created the first time you run a program this way.
+
+How it works:
+
+qinit_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.
+If it's a server it loads all the libraries listed in the library.lst file.
+It then waits for signals to be sent to it which tell it to fork itself and load shared libraries and run them.
+If it decides it's not the server, it sends a signal to the server to run the given command.
+The server then executes a shared object file of whatever name the original process is invoked as (argv[0], the symlink trick)
+The other process waits until the forked server finishes and signals the original process that it as finished and to return
+
+
+