O nás     Inzerce     KontaktSpolehlivé informace o IT již od roku 2011
Hledat
Nepřehlédněte: Usnadní vám práci: Pozoruhodné IT produkty pro rok 2024
Správa dokumentů
Digitální transformace
Informační systémy
Hlavní rubriky: Informační systémy, Mobilní technologie, Datová centra, Sítě, IT bezpečnost, Software, Hardware, Zkušenosti a názory, Speciály

Pozoruhodné IT produkty 2024
E-knihy o IT zdarma
Manuál Linux
[Linux manuál]

tkill, tgkill: poslat signál do jediného procesu

Originální popis anglicky: tkill, tgkill - send a signal to a single process

Návod, kniha: Linux Programmer's Manual

STRUČNĚ

#include <sys/types.h>
 
#include <linux/unistd.h>
 
_syscall2(int, tkill, int, tid, int, sig)
 
int tkill(int tid, int sig);
 
_syscall3(int, tkill, int, tgid, int, tid, int, sig)
 
int tgkill(int tgid, int tid, int sig);

POPIS / INSTRUKCE

The tkill system call is analogous to kill(2), except when the specified process is part of a thread group (created by specifying the CLONE_THREAD flag in the call to clone). Since all the processes in a thread group have the same PID, they cannot be individually signalled with kill. With tkill, however, one can address each process by its unique TID.
The tgkill call improves on tkill by allowing the caller to specify the thread group ID of the thread to be signalled, protecting against TID reuse. If the tgid is specified as -1, tgkill degenerates into tkill.
These are the raw system call interfaces, meant for internal thread library use.

NÁVRATOVÁ HODNOTA

On success, zero is returned. On error, -1 is returned, and errno is set appropriately.

CHYBY / ERRORY

EINVAL
An invalid TID or signal was specified.
EPERM
Permission denied. For the required permissions, see kill(2).
ESRCH
No process with the specified thread ID (and thread group ID) exists.

ODPOVÍDAJÍCÍ

tkill and tgkill are Linux specific and should not be used in programs that are intended to be portable. tkill is supported since Linux 2.4.19 / 2.5.4. tgkill was added in Linux 2.5.75.

SOUVISEJÍCÍ

gettid(2), kill(2)
2004-05-31 Linux 2.6.6
©2011-2024 BusinessIT.cz, ISSN 1805-0522 | Názvy použité v textech mohou být ochrannými známkami příslušných vlastníků.
Provozovatel: Bispiral, s.r.o., kontakt: BusinessIT(at)Bispiral.com | Inzerce: Best Online Media, s.r.o., zuzana@online-media.cz
O vydavateli | Pravidla webu BusinessIT.cz a ochrana soukromí | Používáme účetní program Money S3 | pg(8460)