TacOS
0.2
|
Gestion des signaux. Plus de détails...
Aller au code source de ce fichier.
Macros | |
#define | NSIG 32 |
#define | SIGTYPES |
#define | SIGHUP 0 |
#define | SIGINT 1 |
#define | SIGQUIT 2 |
#define | SIGILL 3 |
#define | SIGTRAP 4 |
#define | SIGABRT 5 |
#define | SIGBUS 6 |
#define | SIGFPE 7 |
#define | SIGKILL 8 |
#define | SIGUSR1 9 |
#define | SIGSEGV 10 |
#define | SIGUSR2 11 |
#define | SIGPIPE 12 |
#define | SIGALRM 13 |
#define | SIGTERM 14 |
#define | SIGCHLD 16 |
#define | SIGCONT 17 |
#define | SIGSTOP 18 |
#define | SIGTSTP 19 |
#define | SIGTTIN 20 |
#define | SIGTTOU 21 |
#define | SIGURG 22 |
#define | SIGSYS 30 |
#define | SIGRTMIN 31 |
#define | SIGRTMAX NSIG-1 |
#define | SIG_BLOCK 0 |
#define | SIG_UNBLOCK 1 |
#define | SIG_SETMASK 2 |
#define | SIG_IGN sig_ignore_handler |
#define | SIG_DFL 0 |
Définitions de type | |
typedef unsigned long | sigset_t |
typedef void(* | sighandler_t )(int) |
Fonctions | |
void | init_signals (void) |
int | kill (unsigned int pid, int sig) |
int | raise (int sig) |
sighandler_t | signal (int sig, sighandler_t func) |
int | sigsuspend (const sigset_t *sigmask) |
int | sigprocmask (int how, const sigset_t *set, sigset_t *oldset) |
int | sigemptyset (sigset_t *set) |
int | sigfillset (sigset_t *set) |
int | sigaddset (sigset_t *set, int signum) |
int | sigdelset (sigset_t *set, int signum) |
int | sigismember (const sigset_t *set, int signum) |
void | sig_ignore_handler (int signal) |
Copyright (C) 2010, 2011, 2012 - TacOS developers.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details at http://www.gnu.org/copyleft/gpl.html
You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses.
#define NSIG 32 |
Nombre de signaux.
#define SIG_DFL 0 |
Utiliser le handler par défaut.
#define SIG_IGN sig_ignore_handler |
Ignorer le signal.
#define SIGABRT 5 |
Abort.
#define SIGALRM 13 |
Signal raised by alarm.
#define SIGBUS 6 |
Bus error.
#define SIGCHLD 16 |
Fin processus fils.
#define SIGCONT 17 |
Continue si arrêté.
#define SIGFPE 7 |
Floating Point Exception.
#define SIGHUP 0 |
Hang up.
#define SIGILL 3 |
Illegal instruction.
#define SIGINT 1 |
Interrupt.
#define SIGKILL 8 |
Terminate.
#define SIGPIPE 12 |
Write to pipe with no one reading.
#define SIGQUIT 2 |
Quit and dump.
#define SIGSEGV 10 |
Segmentation Violation.
#define SIGSTOP 18 |
Stop l'exécution temporairement.
#define SIGSYS 30 |
Bad syscall.
#define SIGTERM 14 |
Termination.
#define SIGTRAP 4 |
Trap.
#define SIGTSTP 19 |
Terminal Stop.
#define SIGTTIN 20 |
Le process en background essaye de lire le tty.
#define SIGTTOU 21 |
Le process en background essaye d'écrire sur le tty.
#define SIGURG 22 |
Urgent data available on socket.
#define SIGUSR1 9 |
Signal utilisateur 1.
#define SIGUSR2 11 |
Signal utilisateur 2.
typedef void(* sighandler_t)(int) |
Type pour un handler de signal.
void init_signals | ( | void | ) |
Mise en place des handlers par défaut.
int kill | ( | unsigned int | pid, |
int | sig | ||
) |
Envoyer un signal à un processus.
pid | l'identifiant du processus. |
sig | le signal à envoyer. |
int raise | ( | int | sig | ) |
Envoyer un signal à l'appelant.
sig | le signal à envoyer. |
sighandler_t signal | ( | int | sig, |
sighandler_t | func | ||
) |
Met en place un handler pour un signal.
sig | le signal à catcher. |
func | fonction handler à utiliser. |