Trivial fixes on error paths
* strace.c (startup_attach): Emit message on fork() failure.
(startup_child): Remove non-informative comment.
* util.c (ptrace_restart): use perror_msg() on error instead of fprintf().
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
diff --git a/strace.c b/strace.c
index fcdae0b..722a0f0 100644
--- a/strace.c
+++ b/strace.c
@@ -424,7 +424,7 @@
if (daemonized_tracer) {
pid_t pid = fork();
if (pid < 0) {
- _exit(1);
+ perror_msg_and_die("fork");
}
if (pid) { /* parent */
/*
@@ -641,7 +641,7 @@
# ifndef FREEBSD
pause();
# else
- kill(pid, SIGSTOP); /* stop HERE */
+ kill(pid, SIGSTOP);
# endif
#else /* !USE_PROCFS */
if (!daemonized_tracer) {