Namespace
Varianti

signal

Da cppreference.com.
< c‎ | program

 
 
Programma di supporto utilità
Programma di terminazione
Original:
Program termination
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
abort
exit
quick_exit(C++11)
_Exit(C++11)
Comunicante con l'ambiente
Original:
Communicating with the environment
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Segnali
Original:
Signals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tipi di segnale
Original:
Signal types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
SIGABRT
SIGFPE
SIGILL
SIGINT
SIGSEGV
SIGTERM
Non locali salti
Original:
Non-local jumps
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
setjmp
longjmp
Tipi
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
jmp_buf
 
Elemento definito nell'header <signal.h>
void (*signal( int sig, void (*handler) (int))) (int);
Consente di impostare il gestore degli errori per sig segnale. Il gestore del segnale può essere impostato in modo che la gestione di default si verificherà, il segnale viene ignorato, o una funzione definita dall'utente viene chiamato.
Original:
Sets the error handler for signal sig. The signal handler can be set so that default handling will occur, signal is ignored, or an user-defined function is called.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Quando gestore di segnale viene impostata su una funzione e un segnale di verifica, è definito se attuazione signal(sig, SIG_DFL) verrà eseguita immediatamente prima dell'inizio del gestore di segnale. Inoltre, l'applicazione può impedire ad alcuni implementazione definita impostare i segnali di af si verifichi mentre il gestore di segnale viene eseguito.
Original:
When signal handler is set to a function and a signal occurs, it is implementation defined whether signal(sig, SIG_DFL) will be executed immediately before the start of signal handler. Also, the implementation can prevent some implementation-defined set af signals from occurring while the signal handler runs.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se l'utente definito funzione ritorna quando si maneggia SIGFPE, SIGILL o SIGSEGV, il comportamento è indefinito. Nella maggior parte delle implementazioni il programma termina.
Original:
If the user defined function returns when handling SIGFPE, SIGILL or SIGSEGV, the behavior is undefined. In most implementations the program terminates.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se il gestore di segnale è chiamato a seguito di abort o raise, il comportamento è indefinito se uno dei seguenti requisiti non è seguita:
Original:
If the signal handler is called as a result of abort or raise, the behavior is undefined if any of the following requirements is not followed:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • il gestore di segnale chiama raise.
    Original:
    the signal handler calls raise.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • il gestore di segnale si riferisce ad un oggetto di durata di conservazione statica che non è dichiarata come volatile sig_atomic_t.
    Original:
    the signal handler refers to an object of static storage duration which is not declared as volatile sig_atomic_t.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • il gestore di segnale chiama qualsiasi funzione all'interno della libreria standard, ad eccezione abort, _Exit o signal con il primo argomento non è il numero del segnale attualmente gestito.
    Original:
    the signal handler calls any function within the standard library, except abort, _Exit, or signal with the first argument not being the number of the signal currently handled.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

Indice

[modifica] Parametri

sig -
il segnale per impostare il gestore di segnale. Può essere un'implementazione valore definito o uno dei seguenti valori:
definisce i tipi di segnale
Original:
defines signal types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(macro costante) [modifica]
Original:
the signal to set the signal handler to. It can be an implementation-defined value or one of the following values:
definisce i tipi di segnale
Original:
defines signal types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(macro costante) [modifica]
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
handler -
il segnale gestore. Questo deve essere uno dei seguenti:
  • SIG_DFL macro. Il gestore del segnale è impostata gestore predefinito del segnale.
  • SIG_IGN macro. Il segnale viene ignorato.
  • Puntatore a una funzione. La firma della funzione deve essere equivalente al seguente:
void fun(int sig);
Original:
the signal handler. This must be one of the following:
  • SIG_DFL macro. The signal handler is set to default signal handler.
  • SIG_IGN macro. The signal is ignored.
  • pointer to a function. The signature of the function must be equivalent to the following:
void fun(int sig);
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Valore di ritorno

Gestore di segnale precedente in caso di successo o SIG_ERR in caso di fallimento (la fissazione di un gestore di segnale può essere disattivato in alcune implementazioni).
Original:
Previous signal handler on success or SIG_ERR on failure (setting a signal handler can be disabled on some implementations).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Esempio

[modifica] Vedi anche

esegue il gestore di segnale per il segnale particolare
Original:
runs the signal handler for particular signal
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(funzione) [modifica]