diff options
author | Colin Watson <cjwatson@debian.org> | 2010-10-25 18:53:05 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2010-10-25 18:53:05 +0100 |
commit | 1a4278212751feccaa83e1ac46c551e96f75934e (patch) | |
tree | b1c20ffaabc6fd66ffe4f4ce00eb649106e787ca /src | |
parent | 8e4acf2b94dc70876fc70a7c94f6037189e26edf (diff) |
* lib/pipeline.c (pipeline_install_post_fork): New function.
(pipeline_start): Call post-fork handler rather than hardcoding
pop_all_cleanups.
* lib/pipeline.h (pipeline_install_post_fork): Add prototype.
* src/lexgrog_test.c (main), src/man.c (main), src/manconv_main.c
(main), src/mandb.c (main), src/whatis.c (main),
src/zsoelim_main.c (main): Install pop_all_cleanups as a post-fork
handler.
Diffstat (limited to 'src')
-rw-r--r-- | src/lexgrog_test.c | 2 | ||||
-rw-r--r-- | src/man.c | 1 | ||||
-rw-r--r-- | src/manconv_main.c | 2 | ||||
-rw-r--r-- | src/mandb.c | 1 | ||||
-rw-r--r-- | src/whatis.c | 2 | ||||
-rw-r--r-- | src/zsoelim_main.c | 2 |
6 files changed, 10 insertions, 0 deletions
diff --git a/src/lexgrog_test.c b/src/lexgrog_test.c index 992b6910..b1fe573d 100644 --- a/src/lexgrog_test.c +++ b/src/lexgrog_test.c @@ -40,6 +40,7 @@ #include "manconfig.h" +#include "cleanup.h" #include "error.h" #include "pipeline.h" #include "security.h" @@ -135,6 +136,7 @@ int main (int argc, char **argv) program_name = base_name (argv[0]); init_debug (); + pipeline_install_post_fork (pop_all_cleanups); init_locale (LC_ALL, ""); if (argp_parse (&argp, argc, argv, 0, 0, 0)) @@ -980,6 +980,7 @@ int main (int argc, char *argv[]) program_name = base_name (argv[0]); init_debug (); + pipeline_install_post_fork (pop_all_cleanups); umask (022); init_locale (LC_ALL, ""); diff --git a/src/manconv_main.c b/src/manconv_main.c index 70915186..0c977b26 100644 --- a/src/manconv_main.c +++ b/src/manconv_main.c @@ -37,6 +37,7 @@ #include "manconfig.h" +#include "cleanup.h" #include "error.h" #include "pipeline.h" #include "decompress.h" @@ -152,6 +153,7 @@ int main (int argc, char *argv[]) program_name = base_name (argv[0]); init_debug (); + pipeline_install_post_fork (pop_all_cleanups); init_locale (LC_ALL, ""); if (argp_parse (&argp, argc, argv, 0, 0, 0)) diff --git a/src/mandb.c b/src/mandb.c index 53948063..c89de8c7 100644 --- a/src/mandb.c +++ b/src/mandb.c @@ -579,6 +579,7 @@ int main (int argc, char *argv[]) program_name = base_name (argv[0]); init_debug (); + pipeline_install_post_fork (pop_all_cleanups); init_locale (LC_ALL, ""); if (argp_parse (&argp, argc, argv, 0, 0, 0)) diff --git a/src/whatis.c b/src/whatis.c index 15289165..1c23c2ad 100644 --- a/src/whatis.c +++ b/src/whatis.c @@ -59,6 +59,7 @@ #include "manconfig.h" +#include "cleanup.h" #include "error.h" #include "pipeline.h" #include "linelength.h" @@ -702,6 +703,7 @@ int main (int argc, char *argv[]) } init_debug (); + pipeline_install_post_fork (pop_all_cleanups); init_locale (LC_ALL, ""); internal_locale = setlocale (LC_MESSAGES, NULL); diff --git a/src/zsoelim_main.c b/src/zsoelim_main.c index 786bc37b..3596486b 100644 --- a/src/zsoelim_main.c +++ b/src/zsoelim_main.c @@ -37,6 +37,7 @@ #include "manconfig.h" +#include "cleanup.h" #include "error.h" #include "pipeline.h" #include "decompress.h" @@ -97,6 +98,7 @@ int main (int argc, char *argv[]) program_name = base_name (argv[0]); init_debug (); + pipeline_install_post_fork (pop_all_cleanups); init_locale (LC_ALL, ""); if (argp_parse (&argp, argc, argv, 0, 0, 0)) |