Diff of /trunk/mkinitrd-magellan/klibc/usr/dash/error.c
Parent Directory | Revision Log | Patch
revision 1121 by niro, Sat Sep 1 22:45:15 2007 UTC | revision 1122 by niro, Wed Aug 18 21:11:40 2010 UTC | |
---|---|---|
# | Line 51 | Line 51 |
51 | #include "show.h" | #include "show.h" |
52 | #include "eval.h" | #include "eval.h" |
53 | #include "parser.h" | #include "parser.h" |
#include "trap.h" | ||
54 | #include "system.h" | #include "system.h" |
55 | ||
56 | ||
# | Line 98 exraise(int e) | Line 97 exraise(int e) |
97 | ||
98 | void | void |
99 | onint(void) { | onint(void) { |
int i; | ||
100 | ||
101 | intpending = 0; | intpending = 0; |
102 | sigclearmask(); | sigclearmask(); |
103 | i = EXSIG; | if (!(rootshell && iflag)) { |
104 | if (gotsig[SIGINT - 1] && !trap[SIGINT]) { | signal(SIGINT, SIG_DFL); |
105 | if (!(rootshell && iflag)) { | raise(SIGINT); |
signal(SIGINT, SIG_DFL); | ||
raise(SIGINT); | ||
} | ||
i = EXINT; | ||
106 | } | } |
107 | exraise(i); | exraise(EXINT); |
108 | /* NOTREACHED */ | /* NOTREACHED */ |
109 | } | } |
110 | ||
# | Line 122 exvwarning2(const char *msg, va_list ap) | Line 116 exvwarning2(const char *msg, va_list ap) |
116 | const char *fmt; | const char *fmt; |
117 | ||
118 | errs = out2; | errs = out2; |
119 | name = arg0; | name = arg0 ?: "sh"; |
120 | fmt = "%s: "; | fmt = "%s: "; |
121 | if (commandname) { | if (commandname) { |
122 | name = commandname; | name = commandname; |
|