X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fwhatnow.c;h=bd1a3d5501500b92b7f9261bb8f853fbd24de470;hb=d36e56e695fe1c482c7920644bfbb6386ac9edb0;hp=761fea1db83cbf619adf86d696d8062d67d1ab43;hpb=88a0787554de9c618e657c31940e734178a25730;p=mmh diff --git a/uip/whatnow.c b/uip/whatnow.c index 761fea1..bd1a3d5 100644 --- a/uip/whatnow.c +++ b/uip/whatnow.c @@ -622,10 +622,9 @@ editfile(char **ed, char **arg, char *file, int use, struct msgs *mp, if ((cp = context_find(cp)) != NULL) *ed = cp; } - } else { + } else if (!*ed) { /* set initial editor */ - if (*ed == NULL && (*ed = context_find("editor")) == NULL) - *ed = defaulteditor; + *ed = defaulteditor; } if (altmsg) { @@ -770,15 +769,13 @@ static int sendfile(char **arg, char *file, int pushsw) { pid_t child_id; - int i, vecp; + int vecp; char *vec[MAXARGS]; context_save(); /* save the context file */ fflush(stdout); - for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++) - sleep(5); - switch (child_id) { + switch (child_id = fork()) { case NOTOK: advise(NULL, "unable to fork, so sending directly..."); /* fall */