quick_exit - C stdlib.h

C examples for stdlib.h:quick_exit

type

function

From


<cstdlib>
<stdlib.h>

Description

Terminate calling process quick

Prototype

     quick_exit (int status);
void quick_exit (int status) noexcept;

Parameters

Parameter Description
status Status code.

If this is 0 or EXIT_SUCCESS, it indicates success. If it is EXIT_FAILURE, it indicates failure.

Return Value

none.

Demo Code

#include <stdio.h>
#include <stdlib.h>

void fnQExit (void){
  puts ("Quick exit function.");
}

int main ()//from w ww . java 2  s  .c  o m
{
  at_quick_exit (fnQExit);

  puts ("Main function: Beginning");

  quick_exit (EXIT_SUCCESS);

  puts ("never executed");
  return 0;
}

Related Tutorials