IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

reboot (2)

REBOOT(2)                  Linux Programmer's Manual                 REBOOT(2)



NAME
       reboot - reboot or enable/disable Ctrl-Alt-Del

SYNOPSIS
       For libc4 and libc5 the library call and the system call are identical,
       and since kernel version 2.1.30 there are symbolic names LINUX_REBOOT_*
       for the constants and a fourth argument to the call:

       #include<unistd.h>
       #include<linux/reboot.h>

       intreboot(int magic,int magic2,int flag,void*arg);

       Under  glibc  some of the constants involved have gotten symbolic names
       RB_*, and the library call is a 1-argument wrapper around  the  3-argu-
       ment system call:

       #include<unistd.h>
       #include<sys/reboot.h>

       intreboot(int flag);

DESCRIPTION
       The  reboot  call  reboots  the  system, or enables/disables the reboot
       keystroke (abbreviated CAD, since the default  is  Ctrl-Alt-Delete;  it
       can be changed using loadkeys(1)).

       This   system   call  will  fail  (with  EINVAL)  unless  magic  equals
       LINUX_REBOOT_MAGIC1   (that   is,   0xfee1dead)   and   magic2   equals
       LINUX_REBOOT_MAGIC2  (that  is, 672274793).  However, since 2.1.17 also
       LINUX_REBOOT_MAGIC2A  (that  is,  85072278)  and  since   2.1.97   also
       LINUX_REBOOT_MAGIC2B  (that  is,  369367448) are permitted as value for
       magic2.  (The hexadecimal values of these  constants  are  meaningful.)
       The flag argument can have the following values:

       LINUX_REBOOT_CMD_RESTART
              (RB_AUTOBOOT,  0x1234567).   The message 'Restarting system.' is
              printed, and a default restart is performed immediately.  If not
              preceded by a sync(2), data will be lost.

       LINUX_REBOOT_CMD_HALT
              (RB_HALT_SYSTEM, 0xcdef0123; since 1.1.76).  The message 'System
              halted.' is printed, and the system is halted.  Control is given
              to  the  ROM  monitor,  if  there  is one.  If not preceded by a
              sync(2), data will be lost.

       LINUX_REBOOT_CMD_POWER_OFF
              (0x4321fedc;  since  2.1.30).   The  message  'Power  down.'  is
              printed,  the  system  is stopped, and all power is removed from
              the system, if possible.  If not preceded  by  a  sync(2),  data
              will be lost.

       LINUX_REBOOT_CMD_RESTART2
              (0xa1b2c3d4; since 2.1.30).  The message 'Restarting system with
              command '%s'' is printed,  and  a  restart  (using  the  command
              string  given in arg) is performed immediately.  If not preceded
              by a sync(2), data will be lost.

       LINUX_REBOOT_CMD_CAD_ON
              (RB_ENABLE_CAD, 0x89abcdef).  CAD is enabled.  This  means  that
              the  CAD  keystroke will immediately cause the action associated
              to LINUX_REBOOT_CMD_RESTART.

       LINUX_REBOOT_CMD_CAD_OFF
              (RB_DISABLE_CAD, 0).  CAD is disabled.  This means that the  CAD
              keystroke will cause a SIGINT signal to be sent to init (process
              1), whereupon this process  may  decide  upon  a  proper  action
              (maybe: kill all processes, sync, reboot).

       Only the super-user may use this function.

       The  precise  effect  of the above actions depends on the architecture.
       For the i386 architecture, the additional argument does not do anything
       at  present (2.1.122), but the type of reboot can be determined by ker-
       nel command line arguments ('reboot=...') to be either  warm  or  cold,
       and either hard or through the BIOS.

RETURNVALUE
       On  success,  zero is returned.  On error, -1 is returned, and errno is
       set appropriately.

ERRORS
       EINVAL Bad magic numbers or flag.

       EPERM  A non-root user attempts to call reboot.

CONFORMINGTO
       reboot is Linux specific, and should not be used in  programs  intended
       to be portable.

SEEALSO
       sync(2), bootparam(7), ctrlaltdel(8), halt(8), reboot(8)



Linux 2.1.122                     1998-09-24                         REBOOT(2)

_Exitgetsockoptoutwshmat
_exitgettidoutw_pshmctl
_llseekgettimeofdaypauseshmdt
_newselectgetuidpersonalityshmget
_sysctlgttypipeshmop
acceptidlepivot_rootshutdown
accessinbpollsigaction
acctinb_pprctlsigaltstack
adjtimexinlpreadsigblock
afs_syscallinl_pprofsiggetmask
alarminsbpselectsigmask
alloc_hugepagesinslptracesignal
arch_prctlinswpwritesigpause
bdflushintroquotactlsigpending
bindinwreadsigprocmask
breakinw_preaddirsigqueue
brkioctlreadlinksigreturn
cacheflushioctl_listreadvsigsetmask
capgetiopermrebootsigsuspend
capsetioplrecvsigtimedwait
chdiripcrecvfromsigvec
chmodkillrecvmsgsigwaitinfo
chownkillpgrenamesocket
chrootlchownrmdirsocketcall
clonelinksbrksocketpair
closelistensched_get_priority_maxssetmask
connectllseeksched_get_priority_minstat
creatlocksched_getaffinitystatfs
duplseeksched_getparamstime
dup2lstatsched_getschedulerstty
execvemadvisesched_rr_get_intervalswapoff
exitmincoresched_setaffinityswapon
fchdirmkdirsched_setparamsymlink
fchmodmknodsched_setschedulersync
fchownmlocksched_yieldsyscall
fcntlmlockallselectsyscalls
fdatasyncmmapselect_tutsysctl
flockmmap2semctlsysfs
forkmodify_ldtsemgetsysinfo
free_hugepagesmountsemopsyslog
fstatmprotectsendtime
fstatfsmpxsendfiletimes
fsyncmremapsendmsgtkill
ftruncatemsgctlsendtotruncate
futexmsggetsetcontextumask
getcontextmsgopsetdomainnameumount
getdentsmsgrcvsetegidumount2
getdomainnamemsgsndseteuiduname
getdtablesizemsyncsetfsgidundocumented
getegidmunlocksetfsuidunimplemented
geteuidmunlockallsetgidunlink
getgidmunmapsetgroupsuselib
getgroupsnanosleepsethostidustat
gethostidnfsservctlsethostnameutime
gethostnamenicesetitimerutimes
getitimerobsoletesetpgidvfork
getpagesizeoldfstatsetpgrpvhangup
getpeernameoldlstatsetpriorityvm86
getpgidoldoldunamesetregidwait
getpgrpoldstatsetresgidwait3
getpidoldunamesetresuidwait4
getppidopensetreuidwaitpid
getpriorityoutbsetrlimitwrite
getresgidoutb_psetsidwritev
getresuidoutlsetsockopt 
getrlimitoutl_psettimeofday 
getrusageoutsbsetuid 
getsidoutslsetup 


Claws Mail 3.7.2
Email client (and news reader), based on GTK+
Samba 3.4.0
Provides file and print services to SMB/CIFS clients
Amaya 11.2
Complete web browsing and authoring environment
Linux Kernel 2.6 2.6.30.1
Linux Kernel
Scintilla 1.79
Free source code editing component
Sawfish 1.5.0
An extensible window manager
ImageMagick 6.5.4.2
ImageMagick image processing studio
Wine 1.1.25
Free implementation of Windows on Unix
GEdit 2.26.3
Small but powerful text editor
WebGUI 7.7.13
A fully featured content management system.
Free IT Magazines, White Papers, eBooks, and more !
Oracle Magazine

Contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more.

Vulnerability Management for Dummies

Get all the Facts and See How to Implement a Successful Vulnerability Management Program.

Website Magazine

Has tapped premier talent in the Internet industry for our content and each and every issue will contain practical advice and insights for website owners.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info