signal
De cppreference.com
![]() |
Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate.
La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
Definido en el archivo de encabezado <signal.h>
|
||
void (*signal( int sig, void (*handler) (int))) (int); |
||
Establece el gestor de errores para
sig
señal. El manejador de la señal puede ajustarse de manera que el manejo de defecto se producirá, señal se ignora, o una función definida por el usuario llamado está .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.
Cuando manejador de la señal se define como una función y se produce una señal, que depende de la implementación si signal(sig, SIG_DFL) se ejecutará inmediatamente antes del inicio del controlador de señal. Además, la aplicación puede prevenir algunas señales definido por la implantación de ajuste af ocurra mientras se ejecuta el manejador de la señal .
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.
Si el usuario devuelve la función definida al manipular
SIGFPE
, SIGILL
o SIGSEGV
, el comportamiento no está definido. En la mayoría de las implementaciones del programa 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.
Si el manejador de la señal se llama como resultado de abort o raise, el comportamiento no está definido si alguno de los siguientes requisitos no se cumple:
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.
- el manejador de la señal llama 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. - el manejador de señal se refiere a un objeto de la duración de almacenamiento estático que no se declara como 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. - el manejador de la señal llama a cualquier función dentro de la biblioteca estándar, excepto abort, _Exit o signal con el primer argumento no es el número de la señal actualmente manejan .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.
Contenido |
[editar] Parámetros
sig | - | la señal para establecer el manejador de señales para. Puede ser una aplicación definida por el valor o uno de los valores siguientes:
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 | - | el manejador de señales. Este debe ser uno de los siguientes:
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. |
[editar] Valor de retorno
Manejador de la señal anterior en el éxito o en el fracaso
SIG_ERR
(establecer un manejador de la señal puede desactivarse en algunas implementaciones) .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.
[editar] Ejemplo
Esta sección está incompleta Razón: sin ejemplo |
[editar] Ver también
ejecuta el manejador de señal para señal particular 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. (función) | |
Documentación de C++ para signal
|