Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

caffeinate(8) [mojave man page]

CAFFEINATE(8)						    BSD System Manager's Manual 					     CAFFEINATE(8)

NAME
caffeinate -- prevent the system from sleeping on behalf of a utility SYNOPSIS
caffeinate [-disu] [-t timeout] [-w pid] [utility arguments...] DESCRIPTION
caffeinate creates assertions to alter system sleep behavior. If no assertion flags are specified, caffeinate creates an assertion to pre- vent idle sleep. If a utility is specified, caffeinate creates the assertions on the utility's behalf, and those assertions will persist for the duration of the utility's execution. Otherwise, caffeinate creates the assertions directly, and those assertions will persist until caffeinate exits. Available options: -d Create an assertion to prevent the display from sleeping. -i Create an assertion to prevent the system from idle sleeping. -m Create an assertion to prevent the disk from idle sleeping. -s Create an assertion to prevent the system from sleeping. This assertion is valid only when system is running on AC power. -u Create an assertion to declare that user is active. If the display is off, this option turns the display on and prevents the display from going into idle sleep. If a timeout is not specified with '-t' option, then this assertion is taken with a default of 5 second timeout. -t Specifies the timeout value in seconds for which this assertion has to be valid. The assertion is dropped after the specified time- out. Timeout value is not used when an utility is invoked with this command. -w Waits for the process with the specified pid to exit. Once the the process exits, the assertion is also released. This option is ignored when used with utility option. EXAMPLE
caffeinate -i make caffeinate forks a process, execs "make" in it, and holds an assertion that prevents idle sleep as long as that process is running. SEE ALSO
pmset(1) LOCATION
/usr/bin/caffeinate Darwin November 9, 2012 Darwin

Check Out this Related Man Page

ASSERT_OPTIONS(3)							 1							 ASSERT_OPTIONS(3)

assert_options - Set/get the various assert flags

SYNOPSIS
mixed assert_options (int $what, [mixed $value]) DESCRIPTION
Set the various assert(3) control options or just query their current settings. PARAMETERS
o $what - Assert Options +------------------+-------------------------------+---+---+ | Option | | | | | | | | | | | INI Setting | | | | | | | | | | Default value | | | | | | | | | | Description | | | | | | | | +------------------+-------------------------------+---+---+ | ASSERT_ACTIVE | | | | | | | | | | | assert.active | | | | | | | | | | 1 | | | | | | | | | | enable assert(3) evaluation | | | | | | | | | ASSERT_WARNING | | | | | | | | | | | assert.warning | | | | | | | | | | 1 | | | | | | | | | | issue a PHP warning for each | | | | | failed assertion | | | | | | | | | ASSERT_BAIL | | | | | | | | | | | assert.bail | | | | | | | | | | 0 | | | | | | | | | | terminate execution on failed | | | | | assertions | | | | | | | | |ASSERT_QUIET_EVAL | | | | | | | | | | | assert.quiet_eval | | | | | | | | | | 0 | | | | | | | | | | disable error_reporting dur- | | | | | ing assertion expression | | | | | evaluation | | | | | | | | | ASSERT_CALLBACK | | | | | | | | | | | assert.callback | | | | | | | | | | ( NULL) | | | | | | | | | | Callback to call on failed | | | | | assertions | | | | | | | | +------------------+-------------------------------+---+---+ o $value - An optional new value for the option. RETURN VALUES
Returns the original setting of any option or FALSE on errors. EXAMPLES
Example #1 assert_options(3) example <?php // This is our function to handle // assert failures function assert_failure() { echo 'Assert failed'; } // This is our test function function test_assert($parameter) { assert(is_bool($parameter)); } // Set our assert options assert_options(ASSERT_ACTIVE, true); assert_options(ASSERT_BAIL, true); assert_options(ASSERT_WARNING, false); assert_options(ASSERT_CALLBACK, 'assert_failure'); // Make an assert that would fail test_assert(1); // This is never reached due to ASSERT_BAIL // being true echo 'Never reached'; ?> SEE ALSO
assert(3). PHP Documentation Group ASSERT_OPTIONS(3)
Man Page