Changeset 3232 in MondoRescue for branches/3.2/mindi-busybox/sysklogd/klogd.c
- Timestamp:
- Jan 1, 2014, 12:47:38 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi-busybox/sysklogd/klogd.c
r2859 r3232 17 17 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 18 18 */ 19 20 //usage:#define klogd_trivial_usage 21 //usage: "[-c N] [-n]" 22 //usage:#define klogd_full_usage "\n\n" 23 //usage: "Kernel logger\n" 24 //usage: "\n -c N Print to console messages more urgent than prio N (1-8)" 25 //usage: "\n -n Run in foreground" 19 26 20 27 #include "libbb.h" … … 189 196 syslog(LOG_NOTICE, "klogd started: %s", bb_banner); 190 197 198 write_pidfile(CONFIG_PID_FILE_PATH "/klogd.pid"); 199 191 200 used = 0; 192 201 while (!bb_got_signal) { … … 232 241 if (*start == '<') { 233 242 start++; 234 if (*start) { 235 /* kernel never generates multi-digit prios */ 236 priority = (*start - '0'); 237 start++; 238 } 243 if (*start) 244 priority = strtoul(start, &start, 10); 239 245 if (*start == '>') 240 246 start++; … … 252 258 klogd_close(); 253 259 syslog(LOG_NOTICE, "klogd: exiting"); 260 remove_pidfile(CONFIG_PID_FILE_PATH "/klogd.pid"); 254 261 if (bb_got_signal) 255 262 kill_myself_with_sig(bb_got_signal);
Note:
See TracChangeset
for help on using the changeset viewer.