aboutsummaryrefslogtreecommitdiff
path: root/init/init.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Svn 16007 broke the build under gcc 4.0.3. This fixes up some of the damageRob Landley2006-08-291-4/+1
| | | | | (the e2fsprogs directory is too twisty and evil to easily fix, but I plan to rewrite it anyway so I'll just bump that up in priority a bit).
* Cleaup read() and write() variants, plus a couple of new functions likeRob Landley2006-07-161-3/+3
| | | | xlseek and fdlength() for the new mkswap.
* Patch from Shaun Jackman to set environment variable RUNLEVEL equal toRob Landley2006-07-091-19/+3
| | | | | | | init's argv[1], so if you append "single" to your kernel command line and the kernel doesn't parse it, RUNLELEL=single. Plus a few unrelated header cleanups while I was in the area...
* More removal of "#if 0" content."Robert P. J. Day"2006-07-011-12/+0
|
* - fix CONFIG_DEBUG_INIT compile failureBernhard Reutner-Fischer2006-06-021-8/+15
|
* make halt and poweroff messages more accurate (i.e., claim "we're about to",Paul Fox2006-06-011-24/+21
| | | | rather than "it's done", and combine with reboot handler to save space.
* - consolidate "Sending SIG%s to all processes"; untested..Bernhard Reutner-Fischer2006-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
* - remove useless variable "status" from init_main.Bernhard Reutner-Fischer2006-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
* - use config_buffer for message()Bernhard Reutner-Fischer2006-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
* - DEBUG_INIT -> config CONFIG_DEBUG_INITBernhard Reutner-Fischer2006-05-291-13/+8
|
* - landley, remove this?Bernhard Reutner-Fischer2006-05-291-1/+1
|
* - set_term() doesn't need an argument. (Like r15220 this is just compile-tested)Bernhard Reutner-Fischer2006-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
* - move common code into new open_new_terminal() function;Bernhard Reutner-Fischer2006-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..
* Consolidate #include <sys/time.h> so libbb.h does it.Rob Landley2006-05-271-1/+0
|
* - remove emacs layout block as suggested by Robert P.J. DayBernhard Reutner-Fischer2006-05-191-8/+0
| | | | - use shorter boilerplate while at it
* fix whitespaceMike Frysinger2006-05-131-1/+1
|
* just include fcntl.h not sys/fcntl.hMike Frysinger2006-04-291-1/+1
|
* More from Jan Kiszka: this is a port of the latest sysv-init SELinux patch.Rob 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.
* Patch from Rogelio Serrano to defer checking whether the tty exists untilRob Landley2006-03-221-4/+3
| | | | we actually need to spawn something on it.
* Patch from Denis Vlasenko turning static const int (which gets emitted intoRob Landley2006-03-101-11/+14
| | | | the busybox binary) into enums (which don't).
* Robert P. Day removed 8 gazillion occurrences of "extern" on functionRob Landley2006-03-061-1/+1
| | | | definitions. (That should only be on prototypes.)
* removed anoinig `unused' warnings"Vladimir N. Oleynik"2006-02-011-8/+9
|
* Re-add initrd support, unify halt/reboot/poweroff, add -n and -f options.Rob Landley2006-01-301-13/+4
|
* just whitespaceTim Riker2006-01-251-1/+1
|
* The whole "init is sometimes pid 3" thing is silly. Init is pid 1, anythingRob Landley2006-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.)
* usage bb_dev_null"Vladimir N. Oleynik"2005-10-121-2/+2
|
* don't out \r to syslog"Vladimir N. Oleynik"2005-09-291-1/+1
|
* Why have a separate CONFIG_INIT_SWAPON when we already have CONFIG_SWAPONOFF?Rob Landley2005-08-301-64/+14
|
* Bug system entry #1 says that when busybox doesn't have swapoff,Rob Landley2005-08-301-3/+1
| | | | init shouldn't call swapoff.
* applying patch from bug 24:Paul Fox2005-08-011-0/+7
| | | | | 0000024 03-16-05 patch: allow init to set controlling tty
* move var decls around a little to help gcc make smaller codeMike Frysinger2005-07-061-8/+8
|
* 2005-07-04 Shaun Jackman <sjackman@gmail.com>Mike Frysinger2005-07-061-3/+2
| | | | | | * init/init.c: Do not include sys/mount.h. (message): Use O_NONBLOCK instead of O_NDELAY. (console_init): Ditto.
* 2005-07-05 Shaun Jackman <sjackman@gmail.com>Mike Frysinger2005-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.
* rename log var to log_console so we dont override internal gcc/glibc log funcMike Frysinger2005-07-051-5/+5
|
* jfb2 writes in Bug 119:Mike Frysinger2005-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).
* Hiroshi Ito writes:Eric 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.
* Hiroshi Ito writes:Eric 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.
* Do not use vfork, as init is not vfork safe. Do not allowEric Andersen2004-08-161-4/+2
| | | | askfirst when mmuless.
* Patch from Bastian Blank:Eric 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
* Silly meEric Andersen2004-04-121-1/+1
|
* As reported by Quy Tonthat, init has problems with inittab's thatEric Andersen2004-04-121-8/+1
| | | | | contain only actions sysinit/wait/once. It does not clean up zombies in that case.
* Jamie Guinan writes:Eric 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
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-151-16/+16
|
* Patch by Guillaume MorinGlenn L McGrath2003-09-261-5/+13
| | | | | Fix two race conditions, as described at. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=212764
* comparison was always false due to limited range of data types.Eric Andersen2003-09-151-1/+1
| | | | | Carefully cast to unsigned long long prior to multiply to get the expected result.
* Update definition of struct serial_struct, per linux-2.6.0-test5,Eric 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.
* more crond+crontab integrating with loginutil libbb functions and deletedGlenn L McGrath2003-09-031-8/+0
| | | | | patch from Thomas Gleixner to init. Viodz last_patch_108
* move all "-/bin/sh" "/bin/sh" and "sh" to libbb/messages.c file as oneGlenn L McGrath2003-09-021-10/+8
| | | | | constant. Vodz last_patch_107
* Fix overflow for machines greater than 4GB, return unsigned int to avoidGlenn L McGrath2003-08-261-5/+6
| | | | a cast and for greater accuracy.
* Yang Xiaopeng writes:Eric 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.