summaryrefslogtreecommitdiffstats
path: root/sbin/reboot/reboot.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* reboot: don't wait for processes to die if there are nonesf2017-08-221-4/+15
| | | | | | | | | If processes are already dead, reduce wait times between SIGTERM and SIGKILL and wait time after SIGKILL. The reboot syscall will cause another sync later on, therefore the long wait times are not necessary for disk i/o, either. "makes sense" deraadt@
* s/CPU_LIDSUSPEND/CPU_LIDACTION/natano2017-06-161-3/+3
| | | | ok mlarkin
* Add a new sysctl machdep.lidaction. The sysctl works as follows:natano2017-03-021-7/+5
| | | | | | | | | | | | | | | machdep.lidaction=0 # do nothing machdep.lidaction=1 # suspend machdep.lidaction=2 # hibernate lidsuspend is just an alias for lidaction, so if you change one, the other one will have the same value. The plan is to remove machdep.lidsuspend eventually when people have upgraded their /ets/sysctl.conf. discussed with deraadt, who came up with the new MIB name no objections mlarkin ok stsp halex jcs
* Pull in <sys/time.h> for struct timespecguenther2016-08-271-2/+2
| | | | | | <sys/fcntl.h> shouldn't be used by userspace; this already uses <fcntl.h> ok deraadt@
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-2/+1
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* Ignore sysctl failure for CPU_LIDSUSPEND when errno is EOPNOTSUPP.millert2013-02-091-2/+2
| | | | | Just because CPU_LIDSUSPEND is defined in cpu.h does mean it is actually supported by the hardware. OK miod@ kettenis@
* disable lidsuspend on shutdownhalex2012-07-101-1/+18
| | | | ok phessler@ mpf@ pirofti@ mpi@
* Block all signals before sending SIGTERM to all non-system processes.millert2010-07-231-1/+9
| | | | | This ensures that we reach the call to reboot(2) without being killed by some other process. OK deraadt@ nicm@
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-15/+1
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* it's silly for reboot to poweroff. adapted from diff by diana eicherttedu2007-05-111-3/+3
|
* delintdhill2006-06-011-3/+3
| | | | ok moritz
* if "/etc/rc shutdown" exits 2, attempt powerdown. it does so ifhenning2006-04-061-4/+7
| | | | | | | rc.shutdown sets powerdown to YES. From: Michele 'mydecay' Marchetto <mydecay@openbeer.it> but didn't apply, so I redid & added comment to clarify ok mickey theo
* variety of cleanups; nofsk@aanet.com.au and Ideraadt2004-07-091-10/+15
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-7/+3
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* ansideraadt2002-07-031-6/+4
|
* Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert2002-02-161-3/+3
|
* kill more registers;mpech2001-11-051-3/+3
| | | | millert@ ok
* #include <termios.h>millert2001-07-191-2/+3
|
* correct type on last arg to execl(); nordin@cse.ogi.eduderaadt2001-07-091-3/+3
|
* return from main() don't exitmickey2001-06-041-5/+5
|
* Add missing fcntl.hmillert2000-04-301-2/+3
|
* have shutdown code run /etc/rc with arg of "shutdown"; rc.shutdown becomes completely admin-editablederaadt1999-09-031-5/+5
|
* we need to include sys/wait.h since we use waitpid hereart1999-08-161-2/+3
|
* run /etc/rc.shutdown on /dev/consolederaadt1999-07-191-3/+24
|
* delete the garbage which does not workderaadt1998-08-071-21/+5
|
* 12 seconds not 30. But I am just about to remove the kill and waitderaadt1998-08-051-4/+4
| | | | | | patch. Obviously it was never tested on a machine running a regular compliment of services. On such a machine, it causes a full 12 (was 30) second delay *EVERY TIME*. That's COMPLETELY unreasonable.
* sync with NetBSDangelos1998-07-121-5/+21
|
* ignore SIGPIPE; nathanw@MIT.EDUderaadt1998-04-251-2/+8
|
* use err()/warn()/__prognamemickey1997-09-031-52/+18
| | | | document -d
* #if __STDC__ --> #ifdef __STDC__mickey1997-07-251-5/+5
|
* Support RB_POWERDOWN.downsj1997-06-221-9/+21
|
* add support for a script called /etc/rc.shutdownderaadt1997-04-111-2/+19
|
* r?index -> strr?chrmillert1997-01-171-3/+3
|
* getopt(3) returns -1 when out of args, not EOF, whee!millert1997-01-151-3/+3
|
* kill (-1, SIGTERM) may find no other processes; netbsd pr#2619, cgdderaadt1996-07-221-4/+14
|
* netbsd pr bin/2618 from cgd, fixed differentlyweingart1996-07-111-3/+11
|
* update rcsidderaadt1996-06-231-1/+2
|
* initial import of NetBSD treederaadt1995-10-181-0/+213