summaryrefslogtreecommitdiffstats
path: root/init/signal_handler.c
Commit message (Collapse)AuthorAgeFilesLines
* Make init distinguish between orderly exit and being killed by signals.Elliott Hughes2013-11-251-1/+9
| | | | | Bug: 11826724 Change-Id: I7c11f602447dbd6862decc51cdfe883003cf7d67
* Merge changes Ib54f39fd,I7e36edd8Colin Cross2013-06-241-4/+6
|\ | | | | | | | | | | * changes: init: Retain traditional restart behavior for critical and oneshot services. init: Safely restart services to avoid race conditions.
| * init: Retain traditional restart behavior for critical and oneshot services.Mike Kasick2012-03-221-4/+6
| | | | | | | | | | | | | | | | Adds an SVC_RESTART state that's used for an explicit "restart" of a running service. This retains the traditional restart behavior for critical and oneshot services (previously altered by 7e36edd8), whereby these services are "simply restarted" instead of counting as a crash (for a critical serivce) or going into the disabled state (for a oneshot service).
* | Use sigemptyset to initialise signal mask as it is more portable.Chris Dearman2012-08-141-3/+1
|/ | | | | | | Referencing sa_restorer fails on MIPS Change-Id: I81c9ed5ef027a9d5258942ffcecb96e3f787e93c Signed-off-by: Chris Dearman <chris@mips.com>
* init/cutils: move list utility code to cutils from initDima Zavin2011-09-021-1/+1
| | | | | Change-Id: I357ceee813700297d8343159f22a07659e768d41 Signed-off-by: Dima Zavin <dima@android.com>
* Try to unmount writable filesystems when rebootingKen Sumrall2011-03-101-4/+2
| | | | | | | | | | | | | | | Ext4 filesystems like to be unmounted before rebooting. The Android system doesn't have a traditional Linux init setup, and shutting down the system was not much more than calling sync(2) and reboot(2). This adds a new function to libcutils called android_reboot(). By default, it calls sync() and then remounts all writable filesystems as read-only and marks them clean. There is a flag parameter in which the caller can ask for sync() not to be called, or to not remount the filesystems as read-only. Then it will call reboot(2) as directed by the other parameters. This change also updates adb, init and toolbox to call the new android_reboot() function. Fixes bugs 3350709 and 3495575. Change-Id: I16d71ffce3134310d7a260f61ec6f4dd204124a7
* Changes to init to support encrypted filesystems.Ken Sumrall2010-12-181-2/+2
| | | | | | | | | These are the changes to init and init.rc necessary to support booting with and encrypted /data filesystem. A corresponding change to init.<device>.rc goes along with this change. Change-Id: I0c7e2cc39568358014a82e317735c0eae14dd683
* init: Move list and log handling to list.h and log.hColin Cross2010-04-211-0/+2
| | | | Change-Id: I298f575c590d0f28b7ad78747f3ebdbba56b7a27
* init: reap exited child processes on signal_initColin Cross2010-04-211-23/+25
| | | | | | | | If any child processes exit before signal_init, they won't get reaped unless another child process exits after signal_init. Calling handle_signal from signal_init forces them to be reaped immediately. Change-Id: I459cfbfe6cf00f29454c62a8c840baf21cb1fb03
* init: Move prototypes for util.c into util.hColin Cross2010-04-131-0/+1
| | | | Change-Id: I46a91849ce5297eb2597dd6134412f817564ec24
* init: Move signal handling to signal_handler.cColin Cross2010-04-131-0/+154
Change-Id: I3a24afa28a1cd279c749d6f384f687b8de56067e