projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b6e0bad
)
mhshow: Wait for children synchonously because we run them serialized.
author
markus schnalke
<meillo@marmaro.de>
Sat, 14 Apr 2012 17:44:41 +0000
(19:44 +0200)
committer
markus schnalke
<meillo@marmaro.de>
Sat, 14 Apr 2012 17:44:41 +0000
(19:44 +0200)
uip/mhshowsbr.c
patch
|
blob
|
history
diff --git
a/uip/mhshowsbr.c
b/uip/mhshowsbr.c
index
4a7fc0c
..
3bcf84f
100644
(file)
--- a/
uip/mhshowsbr.c
+++ b/
uip/mhshowsbr.c
@@
-22,7
+22,6
@@
extern int debugsw;
int nolist = 0;
char *formsw = NULL;
int nolist = 0;
char *formsw = NULL;
-pid_t xpid = 0;
/* mhparse.c */
/* mhparse.c */
@@
-100,9
+99,6
@@
show_all_messages(CT *cts)
static void
show_single_message(CT ct, char *form)
{
static void
show_single_message(CT ct, char *form)
{
- sigset_t set, oset;
- int status;
-
/*
** Allow user executable bit so that temporary directories created by
** the viewer (e.g., lynx) are going to be accessible
/*
** Allow user executable bit so that temporary directories created by
** the viewer (e.g., lynx) are going to be accessible
@@
-115,8
+111,6
@@
show_single_message(CT ct, char *form)
*/
if (form)
DisplayMsgHeader(ct, form);
*/
if (form)
DisplayMsgHeader(ct, form);
- else
- xpid = 0;
/* Show the body of the message */
show_switch(ct, 0);
/* Show the body of the message */
show_switch(ct, 0);
@@
-128,23
+122,6
@@
show_single_message(CT ct, char *form)
if (ct->c_ceclosefnx)
(*ct->c_ceclosefnx) (ct);
if (ct->c_ceclosefnx)
(*ct->c_ceclosefnx) (ct);
- /* block a few signals */
- sigemptyset(&set);
- sigaddset(&set, SIGHUP);
- sigaddset(&set, SIGINT);
- sigaddset(&set, SIGQUIT);
- sigaddset(&set, SIGTERM);
- sigprocmask(SIG_BLOCK, &set, &oset);
-
- while (wait(&status) != NOTOK) {
- pidcheck(status);
- continue;
- }
-
- /* reset the signal mask */
- sigprocmask(SIG_SETMASK, &oset, &set);
-
- xpid = 0;
flush_errors();
}
flush_errors();
}
@@
-182,7
+159,7
@@
DisplayMsgHeader(CT ct, char *form)
/* NOTREACHED */
default:
/* NOTREACHED */
default:
- xpid = child_id;
+ pidcheck(pidwait(child_id, NOTOK));
break;
}
}
break;
}
}
@@
-459,11
+436,6
@@
show_content_aux2(CT ct, int alternate, char *cracked,
{
pid_t child_id;
{
pid_t child_id;
- if (xpid) {
- pidcheck(pidwait(xpid, NOTOK));
- xpid = 0;
- }
-
if (debugsw || cracked) {
fflush(stdout);
if (debugsw || cracked) {
fflush(stdout);