aboutsummaryrefslogtreecommitdiffstats
path: root/doc/program_flow
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-10-26 16:51:34 -0500
committerPeter Seebach <peter.seebach@windriver.com>2011-11-02 13:31:41 -0500
commit6177474388f243c9ff783da074a531ef8fd173fd (patch)
tree8f3df61d79586d6a737e08d4a12f25b606871b5e /doc/program_flow
parent4a646c8bbe73ca830cb8c2e80be4b457d925cdd4 (diff)
downloadpseudo-6177474388f243c9ff783da074a531ef8fd173fd.tar.gz
pseudo-6177474388f243c9ff783da074a531ef8fd173fd.tar.bz2
pseudo-6177474388f243c9ff783da074a531ef8fd173fd.zip
Implement PSEUDO_UNLOAD, replacing existing PSEUDO_RELOADED semantics.
Change from internal PSEUDO_RELOADED to external PSEUDO_UNLOAD environment variable. Enable external programs to have a safe and reliable way to unload pseudo on the next exec*. PSEUDO_UNLOAD also will disable pseudo if we're in a fork/clone situation in the same way PSEUDO_DISABLED=1 would. Rename the PSEUDO_DISABLED tests, and create a similar set for the new PSEUDO_UNLOAD. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'doc/program_flow')
-rw-r--r--doc/program_flow29
1 files changed, 19 insertions, 10 deletions
diff --git a/doc/program_flow b/doc/program_flow
index 8991681..3a399a7 100644
--- a/doc/program_flow
+++ b/doc/program_flow
@@ -14,7 +14,7 @@ libpseudo execution flow:
setup pseudo_functions
setup pseudo_logfile
pseudo_client.c: pseudo_init_client()
- setup PSEUDO_DISBLED
+ setup PSEUDO_DISABLED
setup pseudo_prefix_dir_fd
setup pseudo_localstate_dir_fd
setup PSEUDO_NOSYMLINKEXP
@@ -28,26 +28,35 @@ libpseudo execution flow:
pseudo_check_wrappers():
pseudo_reinit_libpseudo if necessary
call wrap_exec*()
- if !PSEUDO_RELOADED
- pseudo_setupenv()
- else
- pseudo_setupenv()
+ pseudo_setupenv()
+ if PSEUDO_UNLOAD
pseudo_dropenv()
real_exec*()
fork()
- clone()
pseudo_check_wrappers():
pseudo_reinit_libpseudo if necessary
- call wrap_exec*()
- if !PSEUDO_RELOADED
+ call wrap_fork()
+ real_fork()
+ if (child)
pseudo_setupenv()
+ if !PSEUDO_UNLOAD
+ pseudo_reinit_libpseudo()
+ _libpseudo_init()
+ else
+ pseudo_dropenv()
+
+ clone()
+ pseudo_check_wrappers():
+ pseudo_reinit_libpseudo if necessary
+ call wrap_clone()
+ pseudo_setupenv()
+ if !PSEUDO_UNLOAD
pseudo_reinit_libpseudo()
_libpseudo_init()
else
- pseudo_setupenv()
pseudo_dropenv()
- real_*()
+ real_clone()
... normal function wrappers ... (templates/wrapfuncs.c):
pseudo_check_wrappers() || !real_*