aboutsummaryrefslogtreecommitdiff
path: root/init/init.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* oopsandersen2003-07-051-0/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@7042 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Daniel writes:andersen2003-07-051-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn://busybox.net/trunk/busybox@7041 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Apply last_patch93 from vodz:andersen2003-06-271-14/+6
| | | | | | | | | | | | | | | | 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 git-svn-id: svn://busybox.net/trunk/busybox@7008 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Remove bdflush garbage, which is only relevant to unsupportedandersen2003-06-271-11/+0
| | | | | | | kernel versions git-svn-id: svn://busybox.net/trunk/busybox@6988 69ca8d6d-28ef-0310-b511-8ec308f3f277
* There have been many reports of init failing to reboot and/or failing to haltandersen2003-04-241-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: svn://busybox.net/trunk/busybox@6808 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Major coreutils update.mjn32003-03-191-13/+13
| | | | git-svn-id: svn://busybox.net/trunk/busybox@6751 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix a silly compile error, thanks to a patch from Wen-chien Jesse Sungandersen2003-01-231-2/+4
| | | | git-svn-id: svn://busybox.net/trunk/busybox@6434 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Correct some init issues, update email address, last_patch78 by Vladimirbug12003-01-131-175/+158
| | | | | | | N. Oleynik git-svn-id: svn://busybox.net/trunk/busybox@6323 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Odd. I never brought this forward from bb.stable. Should handleandersen2002-12-171-1/+3
| | | | | | | | reaping child processes better. -Erik git-svn-id: svn://busybox.net/trunk/busybox@6223 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Use error_msg instead of fprintf(stderrbug12002-11-281-2/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@6044 69ca8d6d-28ef-0310-b511-8ec308f3f277
* I committed the fflush in the wrong spot. I should go to bedandersen2002-10-221-1/+1
| | | | | | | | earlier so I don't screw up such easy stuff. -Erik git-svn-id: svn://busybox.net/trunk/busybox@5687 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Be absurdly careful about flushing stdout.andersen2002-10-221-2/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@5683 69ca8d6d-28ef-0310-b511-8ec308f3f277
* After thinking about it, I think this patch from Matt Kraai is probably theandersen2002-10-121-13/+3
| | | | | | | | | | | 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). git-svn-id: svn://busybox.net/trunk/busybox@5642 69ca8d6d-28ef-0310-b511-8ec308f3f277
* last_patch61 from vodz:andersen2002-10-101-4/+3
| | | | | | | | | | | | 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. git-svn-id: svn://busybox.net/trunk/busybox@5640 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Set the close-on-exec flag, just to be safandersen2002-09-301-0/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@5607 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Ignoring SIGCHLD causes a race leading to the occasional hang of initandersen2002-09-251-1/+0
| | | | | | | | | 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 git-svn-id: svn://busybox.net/trunk/busybox@5592 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Let people run SHUTDOWN actions prior to killing everythingandersen2002-09-161-3/+5
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@5500 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Thomas Gleixner <tglx@linutronix.de> to doandersen2002-09-121-0/+1
| | | | | | | automatic child reaping to avoid zombies git-svn-id: svn://busybox.net/trunk/busybox@5483 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Eliminate use of obsolete sys_errlist[]andersen2002-08-261-1/+1
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@5395 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Run through indent, fix commentsbug12002-08-221-126/+139
| | | | git-svn-id: svn://busybox.net/trunk/busybox@5340 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Kill a silly warningandersen2002-07-291-0/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@5114 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Tim Riker to allow tty* in inittab if the ttyandersen2002-07-291-45/+14
| | | | | | | actually exists -- serial console is not the issue... git-svn-id: svn://busybox.net/trunk/busybox@5112 69ca8d6d-28ef-0310-b511-8ec308f3f277
* This is last_patch48 from vodz. More cleanups, kills a bitandersen2002-07-031-19/+21
| | | | | | | of dead code, fixes one blatent bug. git-svn-id: svn://busybox.net/trunk/busybox@5012 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Apply last_patch47 from vodz to fix several problems, such as the ash "jobandersen2002-07-031-24/+31
| | | | | | | | | | 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. git-svn-id: svn://busybox.net/trunk/busybox@5002 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix from vodz so that complex init commands actually workandersen2002-07-031-3/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@4995 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from till busch <buti@gmx.at> -- unblock all signalsandersen2002-07-031-0/+16
| | | | | | | in exec_signal() before calling exec() git-svn-id: svn://busybox.net/trunk/busybox@4992 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Doh! Remember to close /etc/inittabandersen2002-05-151-0/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@4779 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Update some missing copyright noticesandersen2002-04-131-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@4599 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Provide a controlling tty to askfirst processes as wellandersen2002-03-291-1/+1
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@4500 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Rewind messages to avoid weird formatting, and fix a bug withandersen2002-03-201-22/+22
| | | | | | | CONFIG_FEATURE_EXTRA_QUIET, which was broken git-svn-id: svn://busybox.net/trunk/busybox@4446 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Update init.c per my changes in the stable branchandersen2002-03-051-222/+269
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@4332 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Teach 'init -q' that init's pid may not equal 1andersen2002-01-251-1/+8
| | | | git-svn-id: svn://busybox.net/trunk/busybox@4111 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Oops.andersen2002-01-061-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@4028 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Do not depend on PATH or getopt arg reorderingandersen2002-01-061-2/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@4026 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Remove `== TRUE' tests and convert `!= TRUE' and `== FALSE' tests to use !.kraai2001-12-201-2/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@3925 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Add in a new restart init target, triggered by SIGHUP. Patch fromandersen2001-12-171-1/+32
| | | | | | | | Russ Dill, with adjustments by me. -Erik git-svn-id: svn://busybox.net/trunk/busybox@3896 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Dan Langlois <dan@somanetworks.com> Support SIGSTOP/SIGCONTandersen2001-11-301-0/+31
| | | | | | | | for wierd situations when people want init to actualy stop doing anything for a while... git-svn-id: svn://busybox.net/trunk/busybox@3821 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix dangling commaandersen2001-11-211-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@3766 69ca8d6d-28ef-0310-b511-8ec308f3f277
* S390 wierdnessandersen2001-11-201-2/+8
| | | | git-svn-id: svn://busybox.net/trunk/busybox@3743 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Hide some ifdefs to make it more readibleandersen2001-11-171-24/+15
| | | | git-svn-id: svn://busybox.net/trunk/busybox@3691 69ca8d6d-28ef-0310-b511-8ec308f3f277
* As Aaron Lehmann just pointed out, I forgot a line...andersen2001-10-281-0/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@3599 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Add in some (theoretical) uClinux support. Some init cleanupsandersen2001-10-281-46/+51
| | | | git-svn-id: svn://busybox.net/trunk/busybox@3596 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Major rework of the directory structure and the entire build system.andersen2001-10-241-16/+16
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@3561 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Scrub up some function prototypes.andersen2001-10-181-4/+4
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@3540 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Two patches from Magick <magick@linux-fan.com>:andersen2001-09-051-19/+24
| | | | | | | | | | 1st makes init smaller, and fixes a bug with AskFirst. Reading from /dev/null gives EOF. 2nd makes init run the command's in the order of inittab, as in FIFO instead of LIFO. git-svn-id: svn://busybox.net/trunk/busybox@3399 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Add support for devfs device names.kraai2001-07-231-17/+9
| | | | git-svn-id: svn://busybox.net/trunk/busybox@3136 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Some patches to make dietlibc work...andersen2001-07-221-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@3134 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Only use a login shell when it will run on a console.kraai2001-06-121-10/+11
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2815 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Loop forever instead of exiting.kraai2001-06-031-9/+12
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2788 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from larry to fix some grammar errors.andersen2001-05-231-2/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@2715 69ca8d6d-28ef-0310-b511-8ec308f3f277