projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
We have only numeric timezone support (e.g. +0200) from now on.
[mmh]
/
uip
/
mhparse.c
diff --git
a/uip/mhparse.c
b/uip/mhparse.c
index
d2f69bc
..
d38f251
100644
(file)
--- a/
uip/mhparse.c
+++ b/
uip/mhparse.c
@@
-13,17
+13,11
@@
#include <errno.h>
#include <setjmp.h>
#include <signal.h>
#include <errno.h>
#include <setjmp.h>
#include <signal.h>
-#include <h/mts.h>
#include <h/tws.h>
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/utils.h>
#include <h/tws.h>
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/utils.h>
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
-
extern int debugsw;
extern int endian; /* mhmisc.c */
extern int debugsw;
extern int endian; /* mhmisc.c */
@@
-2473,7
+2467,7
@@
openFTP(CT ct, char **file)
CE ce;
static char *username = NULL;
static char *password = NULL;
CE ce;
static char *username = NULL;
static char *password = NULL;
- int child_id, i, vecp;
+ int child_id, vecp;
char *vec[9];
e = ct->c_ctexbody;
char *vec[9];
e = ct->c_ctexbody;
@@
-2599,9
+2593,7
@@
openFTP(CT ct, char **file)
fflush(stdout);
fflush(stdout);
- for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
- sleep(5);
- switch (child_id) {
+ switch (child_id = fork()) {
case NOTOK:
adios("fork", "unable to");
/* NOTREACHED */
case NOTOK:
adios("fork", "unable to");
/* NOTREACHED */
@@
-2675,7
+2667,7
@@
InitMail(CT ct)
static int
openMail(CT ct, char **file)
{
static int
openMail(CT ct, char **file)
{
- int child_id, fd, i, vecp;
+ int child_id, fd, vecp;
int len, buflen;
char *bp, buffer[BUFSIZ], *vec[7];
struct exbody *e = ct->c_ctexbody;
int len, buflen;
char *bp, buffer[BUFSIZ], *vec[7];
struct exbody *e = ct->c_ctexbody;
@@
-2727,7
+2719,7
@@
openMail(CT ct, char **file)
return NOTOK;
vecp = 0;
return NOTOK;
vecp = 0;
- vec[vecp++] = mhbasename(mailproc);
+ vec[vecp++] = "mhmail";
vec[vecp++] = e->eb_server;
vec[vecp++] = "-subject";
vec[vecp++] = e->eb_subject ? e->eb_subject : "mail-server request";
vec[vecp++] = e->eb_server;
vec[vecp++] = "-subject";
vec[vecp++] = e->eb_subject ? e->eb_subject : "mail-server request";
@@
-2735,17
+2727,15
@@
openMail(CT ct, char **file)
vec[vecp++] = e->eb_body;
vec[vecp] = NULL;
vec[vecp++] = e->eb_body;
vec[vecp] = NULL;
- for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
- sleep(5);
- switch (child_id) {
+ switch (child_id = fork()) {
case NOTOK:
advise("fork", "unable to");
return NOTOK;
case OK:
case NOTOK:
advise("fork", "unable to");
return NOTOK;
case OK:
- execvp(mailproc, vec);
+ execvp(*vec, vec);
fprintf(stderr, "unable to exec ");
fprintf(stderr, "unable to exec ");
- perror(mailproc);
+ perror(*vec);
_exit(-1);
/* NOTREACHED */
_exit(-1);
/* NOTREACHED */