Use busybox error handling functions wherever possible.
diff --git a/sh.c b/sh.c
index 22a6967..a47ff5c 100644
--- a/sh.c
+++ b/sh.c
@@ -344,7 +344,7 @@
/* Make this job the foreground job */
/* suppress messages when run from /linuxrc mag@sysgo.de */
if (tcsetpgrp(0, job->pgrp) && errno != ENOTTY)
- perror("tcsetpgrp");
+ perror_msg("tcsetpgrp");
child->family->job_list->fg = job;
}
@@ -683,7 +683,7 @@
}
if (childpid == -1 && errno != ECHILD)
- perror("waitpid");
+ perror_msg("waitpid");
}
/* squirrel != NULL means we squirrel away copies of stdin, stdout,
@@ -1422,7 +1422,7 @@
/* move the new process group into the foreground */
/* suppress messages when run from /linuxrc mag@sysgo.de */
if (tcsetpgrp(0, newjob->pgrp) && errno != ENOTTY)
- perror("tcsetpgrp");
+ perror_msg("tcsetpgrp");
}
}
@@ -1612,7 +1612,7 @@
/* move the shell to the foreground */
/* suppress messages when run from /linuxrc mag@sysgo.de */
if (tcsetpgrp(0, getpid()) && errno != ENOTTY)
- perror("tcsetpgrp");
+ perror_msg("tcsetpgrp");
}
}
}
@@ -1620,7 +1620,7 @@
/* return controlling TTY back to parent process group before exiting */
if (tcsetpgrp(0, parent_pgrp))
- perror("tcsetpgrp");
+ perror_msg("tcsetpgrp");
/* return exit status if called with "-c" */
if (input == NULL && WIFEXITED(status))