aboutsummaryrefslogtreecommitdiff
path: root/init/init.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* - fix CONFIG_DEBUG_INIT compile failurealdot2006-06-021-8/+15
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15264 69ca8d6d-28ef-0310-b511-8ec308f3f277
* make halt and poweroff messages more accurate (i.e., claim "we're about to",pgf2006-06-011-24/+21
| | | | | | | rather than "it's done", and combine with reboot handler to save space. git-svn-id: svn://busybox.net/trunk/busybox@15259 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - consolidate "Sending SIG%s to all processes"; untested..aldot2006-05-301-2/+2
| | | | | | | | | text data bss dec hex filename 5379 32 8 5419 152b init/init.o.oorig 5358 32 8 5398 1516 init/init.o git-svn-id: svn://busybox.net/trunk/busybox@15239 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - remove useless variable "status" from init_main.aldot2006-05-301-3/+2
| | | | | | | | | | | | http://www.opengroup.org/onlinepubs/009695399/functions/waitpid.html suggests that we need not specify a status if we don't want, and we don't. "If wait() or waitpid() return because the status of a child process is available, these functions shall return a value equal to the process ID of the child process. In this case, if the value of the argument stat_loc is not a null pointer, information shall be stored in the location pointed to by stat_loc. " text data bss dec hex filename 5391 32 8 5431 1537 init/init.o.06 5379 32 8 5419 152b init/init.o git-svn-id: svn://busybox.net/trunk/busybox@15237 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - use config_buffer for message()aldot2006-05-301-25/+14
| | | | | | | | | | | | | | | | | - add second argument to waitfor(*action,pid); if action==NULL then use pid tor wait for. If an action was given, we wait for the action to finish just as before. In run() remove second and third occurance of the same functionality the waitfor() call now provides. Adjust the former only caller of waitfor accordingly. PS: Not using waitfor but creating a second function used a few bytes more than simply extending and reusing waitfor. text data bss dec hex filename 5426 32 8 5466 155a init/init.o.orig 5391 32 8 5431 1537 init/init.o git-svn-id: svn://busybox.net/trunk/busybox@15236 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - DEBUG_INIT -> config CONFIG_DEBUG_INITaldot2006-05-291-13/+8
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15223 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - landley, remove this?aldot2006-05-291-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15222 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - set_term() doesn't need an argument. (Like r15220 this is just compile-tested)aldot2006-05-291-6/+6
| | | | | | | | | | text data bss dec hex filename 5432 32 8 5472 1560 init/init.o.r15220 5426 32 8 5466 155a init/init.o git-svn-id: svn://busybox.net/trunk/busybox@15221 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - move common code into new open_new_terminal() function;aldot2006-05-291-23/+27
| | | | | | | | | | | | | | | | text data bss dec hex filename 864434 10244 645892 1520570 1733ba busybox_old 864386 10244 645892 1520522 17338a busybox_unstripped add/remove: 1/0 grow/shrink: 0/2 up/down: 92/-143 (-51) function old new delta open_new_terminal - 92 +92 exec_signal 345 276 -69 run 1527 1453 -74 Again, 48 != 51 so let's trust the former.. git-svn-id: svn://busybox.net/trunk/busybox@15220 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Consolidate #include <sys/time.h> so libbb.h does it.landley2006-05-271-1/+0
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15203 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - remove emacs layout block as suggested by Robert P.J. Dayaldot2006-05-191-8/+0
| | | | | | | - use shorter boilerplate while at it git-svn-id: svn://busybox.net/trunk/busybox@15141 69ca8d6d-28ef-0310-b511-8ec308f3f277
* fix whitespacevapier2006-05-131-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15078 69ca8d6d-28ef-0310-b511-8ec308f3f277
* just include fcntl.h not sys/fcntl.hvapier2006-04-291-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@14962 69ca8d6d-28ef-0310-b511-8ec308f3f277
* More from Jan Kiszka: this is a port of the latest sysv-init SELinux patch.landley2006-03-271-0/+21
| | | | | | | | | It makes busybox invoke the libselinux library function to load the binary policy right at system start-up. It was successfully tested on a mini-SELinux system. Note: requires recent libselinux. I'm using 1.28. git-svn-id: svn://busybox.net/trunk/busybox@14672 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Rogelio Serrano to defer checking whether the tty exists untillandley2006-03-221-4/+3
| | | | | | | we actually need to spawn something on it. git-svn-id: svn://busybox.net/trunk/busybox@14606 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Denis Vlasenko turning static const int (which gets emitted intolandley2006-03-101-11/+14
| | | | | | | the busybox binary) into enums (which don't). git-svn-id: svn://busybox.net/trunk/busybox@14513 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Robert P. Day removed 8 gazillion occurrences of "extern" on functionlandley2006-03-061-1/+1
| | | | | | | definitions. (That should only be on prototypes.) git-svn-id: svn://busybox.net/trunk/busybox@14457 69ca8d6d-28ef-0310-b511-8ec308f3f277
* removed anoinig `unused' warningsvodz2006-02-011-8/+9
| | | | git-svn-id: svn://busybox.net/trunk/busybox@13787 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Re-add initrd support, unify halt/reboot/poweroff, add -n and -f options.landley2006-01-301-13/+4
| | | | git-svn-id: svn://busybox.net/trunk/busybox@13701 69ca8d6d-28ef-0310-b511-8ec308f3f277
* just whitespacetimr2006-01-251-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@13584 69ca8d6d-28ef-0310-b511-8ec308f3f277
* The whole "init is sometimes pid 3" thing is silly. Init is pid 1, anythinglandley2006-01-221-15/+2
| | | | | | | | | else is a kernel bug. Both 2.4 and 2.6 should get this right now. This should fix the bug IraquiGeek is seeing (although killall still needs to be fixed.) git-svn-id: svn://busybox.net/trunk/busybox@13489 69ca8d6d-28ef-0310-b511-8ec308f3f277
* usage bb_dev_nullvodz2005-10-121-2/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11846 69ca8d6d-28ef-0310-b511-8ec308f3f277
* don't out \r to syslogvodz2005-09-291-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11692 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Why have a separate CONFIG_INIT_SWAPON when we already have CONFIG_SWAPONOFF?landley2005-08-301-64/+14
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11291 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Bug system entry #1 says that when busybox doesn't have swapoff,landley2005-08-301-3/+1
| | | | | | | init shouldn't call swapoff. git-svn-id: svn://busybox.net/trunk/busybox@11290 69ca8d6d-28ef-0310-b511-8ec308f3f277
* applying patch from bug 24:pgf2005-08-011-0/+7
| | | | | | | | 0000024 03-16-05 patch: allow init to set controlling tty git-svn-id: svn://busybox.net/trunk/busybox@11007 69ca8d6d-28ef-0310-b511-8ec308f3f277
* move var decls around a little to help gcc make smaller codevapier2005-07-061-8/+8
| | | | git-svn-id: svn://busybox.net/trunk/busybox@10723 69ca8d6d-28ef-0310-b511-8ec308f3f277
* 2005-07-04 Shaun Jackman <sjackman@gmail.com>vapier2005-07-061-3/+2
| | | | | | | | | * init/init.c: Do not include sys/mount.h. (message): Use O_NONBLOCK instead of O_NDELAY. (console_init): Ditto. git-svn-id: svn://busybox.net/trunk/busybox@10722 69ca8d6d-28ef-0310-b511-8ec308f3f277
* 2005-07-05 Shaun Jackman <sjackman@gmail.com>vapier2005-07-061-0/+6
| | | | | | | | | * init/Config.in (CONFIG_FEATURE_INIT_SWAPON): New option. * init/init.c (check_memory): Disable the swapon feature unless CONFIG_FEATURE_INIT_SWAPON is defined. git-svn-id: svn://busybox.net/trunk/busybox@10721 69ca8d6d-28ef-0310-b511-8ec308f3f277
* rename log var to log_console so we dont override internal gcc/glibc log funcvapier2005-07-051-5/+5
| | | | git-svn-id: svn://busybox.net/trunk/busybox@10716 69ca8d6d-28ef-0310-b511-8ec308f3f277
* jfb2 writes in Bug 119:vapier2005-04-161-0/+4
| | | | | | | | | | | | | | | The init applet will restart (re-exec) itsself when it receives a SIGHUP. However, just before it enters its main loop, it resets SIGHUP to either re-load the inittab (or ignore it if no inittab is used). Thus preventing the re-exec option from being triggerable. This patch adds a signal handler for SIGQUIT for init that always causes init to re-exec itsself (along with killing anything else that might be still running). git-svn-id: svn://busybox.net/trunk/busybox@10120 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Hiroshi Ito writes:andersen2004-10-081-5/+31
| | | | | | | | | | | | | | | | | | | | | | | Hello, all. Busybox init does not handle removed inittab entry correctly. # I'm sorry about my poor english, but you can find # what I would like to say from patch, isn't it? even if you apply this path, when yoy try to change a command line option in inittab, you have to do following steps. 1. remove old line from initrd 2. send HUP signal to init 3. kill old proces which is invoked from init. 4. append new line to inittab 5. send HUP signal to init, again patch is against current CVS + last patch witch I send it last. git-svn-id: svn://busybox.net/trunk/busybox@9327 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Hiroshi Ito writes:andersen2004-10-081-4/+5
| | | | | | | | | | "kill -HUP 1" reloads inittab, and when I append one line to inittab and send HUP signal two times, It will starts 2 process. patch against current CVS is attached. git-svn-id: svn://busybox.net/trunk/busybox@9326 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Do not use vfork, as init is not vfork safe. Do not allowandersen2004-08-161-4/+2
| | | | | | | askfirst when mmuless. git-svn-id: svn://busybox.net/trunk/busybox@9102 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Bastian Blank:andersen2004-06-221-1/+3
| | | | | | | | | | | | | | On Sat, Jun 19, 2004 at 10:57:37PM +0200, Bastian Blank wrote: > The following patch changes klogd to use openlog/syslog themself > instead of calling syslog_msg which always calls the triple > openlog/syslog/closelog. Updated patch: get rid of syslog_msg entirely. Request from Erik Andersen. Bastian git-svn-id: svn://busybox.net/trunk/busybox@8913 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Silly meandersen2004-04-121-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8741 69ca8d6d-28ef-0310-b511-8ec308f3f277
* As reported by Quy Tonthat, init has problems with inittab's thatandersen2004-04-121-8/+1
| | | | | | | | contain only actions sysinit/wait/once. It does not clean up zombies in that case. git-svn-id: svn://busybox.net/trunk/busybox@8740 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Jamie Guinan writes:andersen2004-04-121-3/+3
| | | | | | | | | | | | | | It looks like latest uClibc defines ARCH_HAS_MMU, but a few busybox files test UCLIBC_HAS_MMU, resulting in vfork() getting called instead of fork(), etc. Patch below. Only tested for lash. Cheers, -Jamie git-svn-id: svn://busybox.net/trunk/busybox@8738 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Remove trailing whitespace. Update copyright to include 2004.andersen2004-03-151-16/+16
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8630 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch by Guillaume Morinbug12003-09-261-5/+13
| | | | | | | | Fix two race conditions, as described at. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=212764 git-svn-id: svn://busybox.net/trunk/busybox@7567 69ca8d6d-28ef-0310-b511-8ec308f3f277
* comparison was always false due to limited range of data types.andersen2003-09-151-1/+1
| | | | | | | | Carefully cast to unsigned long long prior to multiply to get the expected result. git-svn-id: svn://busybox.net/trunk/busybox@7523 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Update definition of struct serial_struct, per linux-2.6.0-test5,andersen2003-09-111-14/+19
| | | | | | | | | to avoid stack corruption problems on some 64bit architectures when sizeof(void*) != sizeof(int). Thanks to Atsushi Nemoto for finding this problem. git-svn-id: svn://busybox.net/trunk/busybox@7464 69ca8d6d-28ef-0310-b511-8ec308f3f277
* more crond+crontab integrating with loginutil libbb functions and deletedbug12003-09-031-8/+0
| | | | | | | | patch from Thomas Gleixner to init. Viodz last_patch_108 git-svn-id: svn://busybox.net/trunk/busybox@7377 69ca8d6d-28ef-0310-b511-8ec308f3f277
* move all "-/bin/sh" "/bin/sh" and "sh" to libbb/messages.c file as onebug12003-09-021-10/+8
| | | | | | | | constant. Vodz last_patch_107 git-svn-id: svn://busybox.net/trunk/busybox@7365 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix overflow for machines greater than 4GB, return unsigned int to avoidbug12003-08-261-5/+6
| | | | | | | a cast and for greater accuracy. git-svn-id: svn://busybox.net/trunk/busybox@7260 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Yang Xiaopeng writes:andersen2003-07-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | >I'm sure that no user process use old root now, but when run "umount >/old_root", it says: > umount: /old_root: Device or resource busy > >I have tried to remount /proc within the new root *after* chroot, but >get the same result. > > I found the problem, I said that no user process use old root when run my scripts, but I'm wrong, actually there is a '3' fd open the file "/old_root/dev/console". By adding debug message in init/init.c, I found the problem: when init restart(in exec_signal()), before open the new terminal device, there is still a file opened(I don't know which file it is), so the terminal device(stdin) get fd '1', and the first dup(0)(stdout) return '2', the second(stderr) return '3'. I attach a simple patch to solve this problem. git-svn-id: svn://busybox.net/trunk/busybox@7128 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Thomas Gleixner to reap any zombie processes that areandersen2003-07-261-0/+8
| | | | | | | reparented to init... git-svn-id: svn://busybox.net/trunk/busybox@7106 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Andrew Flegg:andersen2003-07-221-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | Here's a pretty crude patch to reload /etc/inittab when init receives a SIGHUP. The mailing list archives weren't entirely clear on whether or not it should already happen, but didn't appear to be. The patch: * Adds a new function, reload_signal() which just calls parse_inittab() and run_actions(RESPAWN) * Before entering the while (1) loop set up SIGHUP to call reload_signal() * Modify new_init_action to skip the action if the same command already exists on the same terminal This last bit means that changing already running entries is a bit hairy as you can end up with, for example, two shells running on the same virtual console. However, for solely adding/removing entries this patch seems to work quite well. git-svn-id: svn://busybox.net/trunk/busybox@7092 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Remove remaining libc5 support codeandersen2003-07-221-7/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@7090 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Update a bunch of docs. Run a script to update my email addr.andersen2003-07-141-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@7061 69ca8d6d-28ef-0310-b511-8ec308f3f277