It's already been agreed that failure to fork() is so rare these days
that multiple attempts aren't required. Nor should the code persevere
by calling execve() as if the fork had succeeded, else why bother to
fork? Instead, die.
child_id = fork();
switch (child_id) {
case NOTOK:
- inform("unable to fork, continuing...");
- /* FALLTHRU */
+ adios("fork", "failed:");
+
case OK:
execvp (program, vec);
fprintf (stderr, "unable to exec ");
child_id = fork();
switch (child_id) {
case NOTOK:
- inform("unable to fork, so sending directly...");
- /* FALLTHRU */
+ adios("fork", "failed:");
+
case OK:
vec = argsplit(sendproc, &program, &vecp);
if (pushsw)
switch (distsw ? child_id : OK) {
case NOTOK:
- inform("unable to fork, so checking directly...");
- /* FALLTHRU */
+ adios("fork", "failed:");
+
case OK:
execvp (postproc, vec);
fprintf (stderr, "unable to exec ");