aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/os-Linux/start_up.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c
index b616e15638fb..997d01944f91 100644
--- a/arch/um/os-Linux/start_up.c
+++ b/arch/um/os-Linux/start_up.c
@@ -25,15 +25,15 @@
25#include "registers.h" 25#include "registers.h"
26#include "skas_ptrace.h" 26#include "skas_ptrace.h"
27 27
28static int ptrace_child(void) 28static void ptrace_child(void)
29{ 29{
30 int ret; 30 int ret;
31 /* Calling os_getpid because some libcs cached getpid incorrectly */ 31 /* Calling os_getpid because some libcs cached getpid incorrectly */
32 int pid = os_getpid(), ppid = getppid(); 32 int pid = os_getpid(), ppid = getppid();
33 int sc_result; 33 int sc_result;
34 34
35 change_sig(SIGWINCH, 0); 35 if (change_sig(SIGWINCH, 0) < 0 ||
36 if (ptrace(PTRACE_TRACEME, 0, 0, 0) < 0) { 36 ptrace(PTRACE_TRACEME, 0, 0, 0) < 0) {
37 perror("ptrace"); 37 perror("ptrace");
38 kill(pid, SIGKILL); 38 kill(pid, SIGKILL);
39 } 39 }
@@ -75,9 +75,8 @@ static void fatal(char *fmt, ...)
75 va_list list; 75 va_list list;
76 76
77 va_start(list, fmt); 77 va_start(list, fmt);
78 vprintf(fmt, list); 78 vfprintf(stderr, fmt, list);
79 va_end(list); 79 va_end(list);
80 fflush(stdout);
81 80
82 exit(1); 81 exit(1);
83} 82}
@@ -87,9 +86,8 @@ static void non_fatal(char *fmt, ...)
87 va_list list; 86 va_list list;
88 87
89 va_start(list, fmt); 88 va_start(list, fmt);
90 vprintf(fmt, list); 89 vfprintf(stderr, fmt, list);
91 va_end(list); 90 va_end(list);
92 fflush(stdout);
93} 91}
94 92
95static int start_ptraced_child(void) 93static int start_ptraced_child(void)
@@ -495,7 +493,7 @@ int __init parse_iomem(char *str, int *add)
495 driver = str; 493 driver = str;
496 file = strchr(str,','); 494 file = strchr(str,',');
497 if (file == NULL) { 495 if (file == NULL) {
498 printf("parse_iomem : failed to parse iomem\n"); 496 fprintf(stderr, "parse_iomem : failed to parse iomem\n");
499 goto out; 497 goto out;
500 } 498 }
501 *file = '\0'; 499 *file = '\0';