1 system_test.module system_test_lock_exit()

Try to acquire a specific lock, and then exit.

File

core/modules/simpletest/tests/system_test.module, line 390
Test module for system functions.

Code

function system_test_lock_exit() {
  if (lock_acquire('system_test_lock_exit', 900)) {
    echo 'TRUE: Lock successfully acquired in system_test_lock_exit()';
    // The shut-down function should release the lock.
    exit();
  }
  else {
    return 'FALSE: Lock not acquired in system_test_lock_exit()';
  }
}