static int
m_chkids(void)
{
- int i;
pid_t pid;
if (getuid() == geteuid())
return (-1);
- for (i = 0; (pid = fork()) == -1 && i < 5; i++)
- sleep(5);
-
- switch (pid) {
+ switch (pid = fork()) {
case -1:
break;
push(void)
{
pid_t pid;
- int i;
- for (i = 0; (pid = fork()) == -1 && i < 5; i++)
- sleep(5);
-
- switch (pid) {
+ switch (pid = fork()) {
case -1:
/* fork error */
advise(NULL, "unable to fork, so can't push...");
default:
if (!ce->ce_file) {
pid_t child_id;
- int i, xstdout, len, buflen;
+ int xstdout, len, buflen;
char *bp, **ap, *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");
- 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 fork");
/* NOTREACHED */
vec[nvec++] = "-queued";
vec[nvec] = NULL;
- for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
- sleep(5);
-
- if (child_id == NOTOK) {
+ if ((child_id = fork()) == NOTOK) {
/* report failure and then send it */
adios(NULL, "unable to fork");
} else if (child_id) {
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;
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 */
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;
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;
DisplayMsgHeader(CT ct, char *form)
{
pid_t child_id;
- int i, vecp;
+ int vecp;
char *vec[8];
vecp = 0;
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 */
char *buffer, int fd, int xlist, int xstdin, int xtty)
{
pid_t child_id;
- int i;
char *vec[4], exec[BUFSIZ + sizeof "exec "];
if (debugsw || cracked) {
fflush(stdout);
- 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");
(*ct->c_ceclosefnx) (ct);
sendaux(char **vec, int vecp, char *drft, struct stat *st)
{
pid_t child_id;
- int i, status, fd;
+ int status, fd;
char backup[BUFSIZ];
/*
}
vec[vecp] = NULL;
- for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++) {
- sleep(5);
- }
- switch (child_id) {
+ switch (child_id = fork()) {
case -1:
/* oops -- fork error */
adios("fork", "unable to");
alert(char *file, int out)
{
pid_t child_id;
- int i, in;
+ int in;
char buf[BUFSIZ];
- for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++) {
- sleep(5);
- }
-
- switch (child_id) {
+ switch (child_id = fork()) {
case NOTOK:
/* oops -- fork error */
advise("fork", "unable to");
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 */