author | kergoth <kergoth> | 2002-01-25 22:14:26 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-01-25 22:14:26 (UTC) |
commit | 15318cad33835e4e2dc620d033e43cd930676cdd (patch) (side-by-side diff) | |
tree | c2fa0399a2c47fda8e2cd0092c73a809d17f68eb /quickexec/johns/README | |
download | opie-15318cad33835e4e2dc620d033e43cd930676cdd.zip opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.gz opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.bz2 |
Initial revision
-rw-r--r-- | quickexec/johns/README | 21 |
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 + + + |