aboutsummaryrefslogtreecommitdiff
path: root/init
AgeCommit message (Collapse)Author
2003-07-05Daniel writes:Eric Andersen
I've found a problem with job control when the init process is restarted. If the system boots for the first time, I get job control on a serial terminal - no problems. However, when I restart init by issuing "init -q", then the shell no longer has job control. I traced this a problem in console_init in the file init.c. What was happening after the restart is that the first compare if (ioctl(0, TIOCGSERIAL, &sr) == 0) { ... } else if (ioctl(0, VT_GETSTATE, &vt) == 0) { ... } else { ... // assume /dev/console } returned error and subsequently the code assumes /dev/console as the console, which does not support job control. Checking the errno after the first call showed that the system was complaining about the file descriptor. This is probably because the previous init process had closed all its file descriptors which the new init process had inherited.
2003-07-05Patch from Kent Robotti adding a bunch of needed docs!Eric Andersen
-Erik
2003-06-27Apply last_patch93 from vodz:Eric Andersen
andersen@busybox.net wrote: >Message: 4 >Modified Files: > init.c >Log Message: >Remove code for unsupported kernel versions Hmm. Current init.c have check >= 2.2.0 kernel one time too. Ok. Last patch removed this point and move common init code to new file for /init dir
2003-06-27Remove bdflush garbage, which is only relevant to unsupportedEric Andersen
kernel versions
2003-05-11minit, a Minimal init system.Glenn L McGrath
2003-04-24There have been many reports of init failing to reboot and/or failing to haltEric Andersen
over the years. Well I finally took the time to track this down. It turns out that inside linux/kernel/sys.c the kernel will call machine_halt(); do_exit(0); when halting, or will call machine_power_off(); do_exit(0); during a reboot. Unlike sysv init, we call reboot from within the init process, so if the call to machine_halt() or machine_power_off() returns, the call to do_exit(0) will cause the kernel to panic. Which is a very bad thing to happen. So I just added this little patch to fork and call the reboot syscall from within the forked child process, thereby neatly avoiding the problem. But IMHO, both calls to do_exit(0) within linux/kernel/sys.c are bugs and should be fixed. -Erik
2003-03-19Major coreutils update.Manuel Novoa III
2003-01-23Fix a silly compile error, thanks to a patch from Wen-chien Jesse SungEric Andersen
2003-01-13Correct some init issues, update email address, last_patch78 by VladimirGlenn L McGrath
N. Oleynik
2002-12-17Odd. I never brought this forward from bb.stable. Should handleEric Andersen
reaping child processes better. -Erik
2002-12-07include "busybox" after the libc includes tofix compile errorsGlenn L McGrath
2002-12-05Yet another major rework of the BusyBox config system, using the considerablyEric Andersen
modified Kbuild system I put into uClibc. With this, there should be no more need to modify Rules.mak since I've moved all the interesting options into the config system. I think I've got everything updated, but you never know, I may have made some mistakes, so watch closely. -Erik
2002-11-28Use error_msg instead of fprintf(stderrGlenn L McGrath
2002-11-11Move readlink, mktemp, run-parts and which to a new debianutils dir.Glenn L McGrath
2002-10-22I committed the fflush in the wrong spot. I should go to bedEric Andersen
earlier so I don't screw up such easy stuff. -Erik
2002-10-22Be absurdly careful about flushing stdout.Eric Andersen
2002-10-12After thinking about it, I think this patch from Matt Kraai is probably theEric Andersen
best way to go. Sysvinit does not provide a controlling tty since it doesn't even try to open ttys for apps. We do. So we should _try_ to provide a controlling tty if possible, but we needn't freak out if it doesn't work. This way we won't need to use openvt or similar, we'll just have init do the Right Thing(tm).
2002-10-10last_patch61 from vodz:Eric Andersen
New complex patch for decrease size devel version. Requires previous patch. Also removed small problems from dutmp and tar applets. Also includes vodz' last_patch61_2: Last patch correcting comment for #endif and more integrated with libbb (very reduce size if used "cat" applet also). Requires last_patch61 for modutils/config.in.
2002-09-30Set the close-on-exec flag, just to be safEric Andersen
2002-09-25Ignoring SIGCHLD causes a race leading to the occasional hang of initEric Andersen
when init will wait() on itself in waitfor() when the child exits before init is scheduled to run. Letting init hang is very seriously bad. -Erik
2002-09-17Patch from David McCullough <davidm@snapgear.com>Eric Andersen
2002-09-16Let people run SHUTDOWN actions prior to killing everythingEric Andersen
-Erik
2002-09-16mesg applet by Manuel Novoa IIIGlenn L McGrath
2002-09-12Patch from Thomas Gleixner <tglx@linutronix.de> to doEric Andersen
automatic child reaping to avoid zombies
2002-08-26Eliminate use of obsolete sys_errlist[]Eric Andersen
-Erik
2002-08-22Run through indent, fix commentsGlenn L McGrath
2002-07-29Kill a silly warningEric Andersen
2002-07-29Patch from Tim Riker to allow tty* in inittab if the ttyEric Andersen
actually exists -- serial console is not the issue...
2002-07-03This is last_patch48 from vodz. More cleanups, kills a bitEric Andersen
of dead code, fixes one blatent bug.
2002-07-03Scrub pwd.h and grp.h handling so we don't have to play anyEric Andersen
silly games. -Erik
2002-07-03Apply last_patch47 from vodz to fix several problems, such as the ash "jobEric Andersen
control turned off" bug, console_setup() was called with a closed file descriptor, setsid() inconsistancy, and silly string handling bugs. I have modified his patch to allow the askfirst init actions to have a controlling terminal.
2002-07-03Fix from vodz so that complex init commands actually workEric Andersen
2002-07-03Patch from till busch <buti@gmx.at> -- unblock all signalsEric Andersen
in exec_signal() before calling exec()
2002-06-05plug fd leak noticed by Russ DillEric Andersen
-Erik
2002-06-04Fix for broken handling off BusyBox's own pwd/grp implementationsRobert Griebl
[Parts of this patch may overlap with my other two patches]
2002-05-15Doh! Remember to close /etc/inittabEric Andersen
2002-04-13Update some missing copyright noticesEric Andersen
2002-04-12Completely rework the config system so that it no longer annoys me to work onEric Andersen
the busybox development tree. This eliminates the use of recursive make, and once again allows us to run 'make' in a subdirectory with the expected result. And things are now much faster too. Greatly improved IMHO... -Erik
2002-03-29Provide a controlling tty to askfirst processes as wellEric Andersen
-Erik
2002-03-20Rewind messages to avoid weird formatting, and fix a bug withEric Andersen
CONFIG_FEATURE_EXTRA_QUIET, which was broken
2002-03-05Update init.c per my changes in the stable branchEric Andersen
-Erik
2002-01-26Patch from Russ Dill <Russ.Dill@asu.edu>. From theEric Andersen
start-stop-daemon man page: -b|--background Typically used with programs that don't detach on their own. This option will force start-stop-daemon to fork before starting the process, and force it into the background. WARNING: start-stop-daemon cannot check the exit status if the process fails to execute for any reason. This is a last resort, and is only meant for programs that either make no sense forking on their own, or where it's not feasible to add the code for it to do this itself. This is usefull for applets like watchdog
2002-01-25Teach 'init -q' that init's pid may not equal 1Eric Andersen
2002-01-06Oops.Eric Andersen
2002-01-06Do not depend on PATH or getopt arg reorderingEric Andersen
2001-12-20Remove `== TRUE' tests and convert `!= TRUE' and `== FALSE' tests to use !.Matt Kraai
2001-12-18Vodz' last_patch31Eric Andersen
Very minimal last corrections: 1) busybox.c: fix warining 2) docs/: add applets for list from pwd_grp 3) usage.h: add -n option for route 4) run_parts.c: many todo fix for busybox style 5) addgroup.c: add #ifdef CONFIG_FEATURE_SHADOWPASSWDS, reduce one perror_msg 6) adduser.c: fix bug "variable i not initialize" and add #ifdef CONFIG_FEATURE_SHADOWPASSWDS
2001-12-17Add in a new restart init target, triggered by SIGHUP. Patch fromEric Andersen
Russ Dill, with adjustments by me. -Erik
2001-12-06If find_pid_by_name() had an error, it was returning -1, but storingEric Andersen
that into a pid_t, which is unsigned on a number archs. Furthermore, find_pid_by_name() would _never_ return an error if the intended proces was "init", but instead would return 1, meaning we would fail to work on 2.4.x kernels running an initrd... -Erik
2001-11-30Patch from Dan Langlois <dan@somanetworks.com> Support SIGSTOP/SIGCONTEric Andersen
for wierd situations when people want init to actualy stop doing anything for a while...