summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5977791)
The existing loop that slept five seconds between each attempt was
copy-pasted widely. Those days are gone. Just call it once.
12 files changed:
return sm_ierror ("no pipes");
}
return sm_ierror ("no pipes");
}
- for (i = 0; (sm_child = fork ()) == NOTOK && i < 5; i++)
- sleep (5);
-
switch (sm_child) {
case NOTOK:
close (pdo[0]);
switch (sm_child) {
case NOTOK:
close (pdo[0]);
- int i;
-
- for (i = 0; (pid = fork()) == -1 && i < 5; i++)
- sleep (5);
switch (pid) {
case -1:
/* fork error */
switch (pid) {
case -1:
/* fork error */
char *file, char *filter, int dashstuff)
{
pid_t child_id;
char *file, char *filter, int dashstuff)
{
pid_t child_id;
char buf1[BUFSIZ];
char buf2[BUFSIZ];
char *program;
char buf1[BUFSIZ];
char buf2[BUFSIZ];
char *program;
argsplit_msgarg(&vec, mhlproc, &program);
argsplit_msgarg(&vec, mhlproc, &program);
- for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
- sleep (5);
-
switch (child_id) {
case NOTOK:
adios ("fork", "unable to");
switch (child_id) {
case NOTOK:
adios ("fork", "unable to");
default:
if (!ce->ce_file) {
pid_t child_id;
default:
if (!ce->ce_file) {
pid_t child_id;
- int i, xstdout, len, buflen;
+ int xstdout, len, buflen;
char *bp, *cp;
char *vec[4], buffer[BUFSIZ];
FILE *out;
char *bp, *cp;
char *vec[4], buffer[BUFSIZ];
FILE *out;
if ((out = fopen (ce->ce_file, "w")) == NULL)
adios (ce->ce_file, "unable to open for writing");
if ((out = fopen (ce->ce_file, "w")) == NULL)
adios (ce->ce_file, "unable to open for writing");
- for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
- sleep (5);
switch (child_id) {
case NOTOK:
adios ("fork", "unable to fork");
switch (child_id) {
case NOTOK:
adios ("fork", "unable to fork");
- for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
- sleep (5);
switch (child_id) {
case NOTOK:
adios ("fork", "unable to");
switch (child_id) {
case NOTOK:
adios ("fork", "unable to");
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;
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) {
case NOTOK:
advise ("fork", "unable to");
switch (child_id) {
case NOTOK:
advise ("fork", "unable to");
DisplayMsgHeader (CT ct, char *form, int concatsw)
{
pid_t child_id;
DisplayMsgHeader (CT ct, char *form, int concatsw)
{
pid_t child_id;
- for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
- sleep (5);
-
switch (child_id) {
case NOTOK:
adios ("fork", "unable to");
switch (child_id) {
case NOTOK:
adios ("fork", "unable to");
int fd, int xlist, int xstdin, struct format *fmt)
{
pid_t child_id;
int fd, int xlist, int xstdin, struct format *fmt)
{
pid_t child_id;
char **vec, *file;
if (debugsw || cracked) {
char **vec, *file;
if (debugsw || cracked) {
- for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
- sleep (5);
switch (child_id) {
case NOTOK:
advise ("fork", "unable to");
switch (child_id) {
case NOTOK:
advise ("fork", "unable to");
* of MIME encapsulation.
*/
if (filter != NULL) {
* of MIME encapsulation.
*/
if (filter != NULL) {
- for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
- sleep (5);
switch (child_id) {
case NOTOK:
adios ("fork", "unable to");
switch (child_id) {
case NOTOK:
adios ("fork", "unable to");
post (char *file, int bccque, int talk, int eai, char *envelope,
int oauth_flag, char *auth_svc)
{
post (char *file, int bccque, int talk, int eai, char *envelope,
int oauth_flag, char *auth_svc)
{
pid_t child_id;
if (verbose) {
pid_t child_id;
if (verbose) {
char **argp, *program;
int argc;
char **argp, *program;
int argc;
- for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
- sleep (5);
switch (child_id) {
case NOTOK:
adios ("fork", "unable to");
switch (child_id) {
case NOTOK:
adios ("fork", "unable to");
fcc (char *file, char *folder)
{
pid_t child_id;
fcc (char *file, char *folder)
{
pid_t child_id;
char fold[BUFSIZ];
char **arglist, *program;
char fold[BUFSIZ];
char **arglist, *program;
printf (" %sFcc %s: ", msgstate == RESENT ? "Resent-" : "", folder);
fflush (stdout);
printf (" %sFcc %s: ", msgstate == RESENT ? "Resent-" : "", folder);
fflush (stdout);
- for (i = 0; (child_id = fork ()) == NOTOK && i < 5; i++)
- sleep (5);
-
switch (child_id) {
case NOTOK:
if (!verbose)
switch (child_id) {
case NOTOK:
if (!verbose)
main (int argc, char **argv)
{
pid_t child_id;
main (int argc, char **argv)
{
pid_t child_id;
char *addrs = NULL, *cp, *form = NULL, buf[BUFSIZ], *program;
char **argp, **arguments, **vec;
FILE *fp;
char *addrs = NULL, *cp, *form = NULL, buf[BUFSIZ], *program;
char **argp, **arguments, **vec;
FILE *fp;
vec[vecp++] = drft;
vec[vecp] = NULL;
vec[vecp++] = drft;
vec[vecp] = NULL;
- for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
- sleep (5);
switch (child_id) {
case NOTOK:
inform("unable to fork, continuing...");
switch (child_id) {
case NOTOK:
inform("unable to fork, continuing...");
sendaux (char **vec, int vecp, char *program, char *drft, struct stat *st)
{
pid_t child_id;
sendaux (char **vec, int vecp, char *program, char *drft, struct stat *st)
{
pid_t child_id;
- int i, status, fd, fd2;
char backup[BUFSIZ], buf[BUFSIZ];
fd = pushsw ? tmp_fd () : NOTOK;
char backup[BUFSIZ], buf[BUFSIZ];
fd = pushsw ? tmp_fd () : NOTOK;
done (1);
vec[vecp] = NULL;
done (1);
vec[vecp] = NULL;
- for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
- sleep (5);
-
switch (child_id) {
case -1:
/* oops -- fork error */
switch (child_id) {
case -1:
/* oops -- fork error */
alert (char *file, int out)
{
pid_t child_id;
alert (char *file, int out)
{
pid_t child_id;
char buf[BUFSIZ];
char *program;
char **arglist;
char buf[BUFSIZ];
char *program;
char **arglist;
- for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
- sleep (5);
-
switch (child_id) {
case NOTOK:
/* oops -- fork error */
switch (child_id) {
case NOTOK:
/* oops -- fork error */
{
volatile int fd = fd_arg;
pid_t child_id;
{
volatile int fd = fd_arg;
pid_t child_id;
- int i, bytes, seconds, status;
+ int bytes, seconds, status;
struct stat st;
if (verbose && !suppress)
struct stat st;
if (verbose && !suppress)
- for (i = 0; (child_id = fork()) == -1 && i < 5; i++)
- sleep (5);
-
switch (child_id) {
case -1:
/* fork error */
switch (child_id) {
case -1:
/* fork error */
sendfile (char **arg, char *file, int pushsw)
{
pid_t child_id;
sendfile (char **arg, char *file, int pushsw)
{
pid_t child_id;
char *cp, *sp, **vec, *program;
/*
char *cp, *sp, **vec, *program;
/*
context_save (); /* save the context file */
fflush (stdout);
context_save (); /* save the context file */
fflush (stdout);
- for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
- sleep (5);
switch (child_id) {
case NOTOK:
inform("unable to fork, so sending directly...");
switch (child_id) {
case NOTOK:
inform("unable to fork, so sending directly...");
main (int argc, char **argv)
{
pid_t child_id = OK;
main (int argc, char **argv)
{
pid_t child_id = OK;
- int i, status, isdf = 0;
int distsw = 0, vecp = 0;
char *cp, *dfolder = NULL, *dmsg = NULL;
char *msg = NULL, **ap, **argp, backup[BUFSIZ];
int distsw = 0, vecp = 0;
char *cp, *dfolder = NULL, *dmsg = NULL;
char *msg = NULL, **ap, **argp, backup[BUFSIZ];
- if (distsw) {
- for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
- sleep (5);
- }
+ if (distsw)
+ child_id = fork();
switch (distsw ? child_id : OK) {
case NOTOK:
switch (distsw ? child_id : OK) {
case NOTOK: