Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
shutdown(3)			 Arcan Lua API			   shutdown(3)

NAME
       shutdown	- Queue	a shutdown event.

SYNOPSIS
       nil
       shutdown(

       optmsg, optcode )

DESCRIPTION
       This  function  will shutdown the engine	and terminate the process when
       deemed safe. This means that it	will  not  happened  immediately,  but
       rather  that an event will be queued internally in order	to give	frame-
       servers and other pending-data related tasks time to clean-up. The sys-
       tem interpretation of optcode  varies with the underlying  environment,
       though the EXIT_SUCCESS	and EXIT_FAILURE  constants are	propagated and
       useful  here.  There is also a special constant,	EXIT_SILENT  that will
       return an EXIT_SUCCESS  to the outer system, but	only signal a 'display
       server lost' action to external clients,	rather	than  asking  them  to
       shut down.

NOTES
       1      by  default,  the	exit code corresponds to system	EXIT_SUCCESS ,
	      but can be set to	a custom value through optcode .

       2      optmsg is	filtered to only accept	[a-Z,.0-9] and whitespace.

EXAMPLE
       function	shutdown0()
	     return shutdown();
       end

EXAMPLE
       function	shutdown1()
	     return shutdown("giving up", -1);
       end

system				  April	2025			   shutdown(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=shutdown&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>

home | help