GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::raise(3) C++ Standard Libary std::raise(3)

std::raise - std::raise


Defined in header <csignal>
int raise( int sig );


Sends signal sig to the program. The signal handler (specified using the
std::signal() function) is invoked.


If the user-defined signal handling strategy is not set using std::signal() yet, it
is implementation-defined whether the signal will be ignored or default handler will
be invoked.


the signal to be sent. It can be an implementation-defined value or one of the
following values:


SIGABRT
sig - SIGFPE
SIGILL defines signal types
SIGINT (macro constant)
SIGSEGV
SIGTERM


0 upon success, non-zero value on failure.

// Run this code


#include <csignal>
#include <iostream>


void signal_handler(int signal)
{
std::cout << "Received signal " << signal << '\n';
}


int main()
{
// Install a signal handler
std::signal(SIGTERM, signal_handler);


std::cout << "Sending signal " << SIGTERM << '\n';
std::raise(SIGTERM);
}


Sending signal 15
Received signal 15


signal sets a signal handler for particular signal
(function)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.