signal
Da cppreference.com.
![]() |
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
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.
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.
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.
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.
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:
Original: the signal to set the signal handler to. It can be an implementation-defined value or one of the following values:
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:
Original: the signal handler. This must be one of the following:
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.
You can help to correct and verify the translation. Click here for instructions.
[modifica] Esempio
This section is incomplete Reason: no example |
[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) | |
C++ documentation for signal
|