.\" -*- coding: UTF-8 -*- .\" Copyright 2003, Abhijit Menon-Sen .\" Copyright 2008, Michael Kerrisk .\" Copyright, the authors of the Linux man-pages project .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH tkill 2 "8 فبراير 2026" "صفحات دليل لينكس 6.18" .SH الاسم tkill, tgkill \- إرسال إشارة إلى خيط .SH المكتبة مكتبة سي المعيارية (\fIlibc\fP،\ \fI\-lc\fP) .SH موجز .nf \fB#include \fP /* Definition of \fBSIG*\fP constants */ \fB#include \fP /* Definition of \fBSYS_*\fP constants */ \fB#include \fP .P \fB[[deprecated]] int syscall(SYS_tkill, pid_t \fP\fItid\fP\fB, int \fP\fIsig\fP\fB);\fP .P \fB#include \fP .P \fBint tgkill(pid_t \fP\fItgid\fP\fB, pid_t \fP\fItid\fP\fB, int \fP\fIsig\fP\fB);\fP .fi .P \fIملاحظة\fP: لا توفر glibc غلافًا لـ \fBtkill\fP()، مما يستلزم استخدام \fBsyscall\fP(2). .SH الوصف ترسل \fBtgkill\fP() الإشارة \fIsig\fP إلى الخيط ذي معرف الخيط \fItid\fP في مجموعة الخيوط \fItgid\fP. (على النقيض، يمكن استخدام \fBkill\fP(2) لإرسال إشارة فقط إلى عملية (أي مجموعة خيوط) ككل، وسيتم تسليم الإشارة إلى خيط عشوائي داخل تلك العملية.) .P .\" FIXME Maybe say something about the following: .\" http://sourceware.org/bugzilla/show_bug.cgi?id=12889 .\" .\" Quoting Rich Felker : .\" .\" There is a race condition in pthread_kill: it is possible that, .\" between the time pthread_kill reads the pid/tid from the target .\" thread descriptor and the time it makes the tgkill syscall, .\" the target thread terminates and the same tid gets assigned .\" to a new thread in the same process. .\" .\" (The tgkill syscall was designed to eliminate a similar race .\" condition in tkill, but it only succeeded in eliminating races .\" where the tid gets reused in a different process, and does not .\" help if the same tid gets assigned to a new thread in the .\" same process.) .\" .\" The only solution I can see is to introduce a mutex that ensures .\" that a thread cannot exit while pthread_kill is being called on it. .\" .\" Note that in most real-world situations, like almost all race .\" conditions, this one will be extremely rare. To make it .\" measurable, one could exhaust all but 1-2 available pid values, .\" possibly by lowering the max pid parameter in /proc, forcing .\" the same tid to be reused rapidly. \fBtkill\fP() هو سلف مهمل لـ \fBtgkill\fP(). يسمح فقط بتحديد معرف الخيط الهدف، مما قد يؤدي إلى إرسال الإشارة إلى الخيط الخطأ إذا أنهى خيط عمله وأُعيد استخدام معرف خيطه. تجنب استخدام استدعاء النظام هذا. .P هذه هي واجهات استدعاء النظام الخام، المخصصة للاستخدام الداخلي لمكتبة الخيوط. .SH "قيمة الإرجاع" عند النجاح، يُعاد الصفر. وعند حدوث خطأ، يُعاد الرقم \-1، ويُضبط \fIerrno\fP للإشارة إلى الخطأ. .SH الأخطاء .TP \fBEAGAIN\fP تم الوصول إلى حد المورد \fBRLIMIT_SIGPENDING\fP و \fIsig\fP هي إشارة زمن حقيقي. .TP \fBEAGAIN\fP ذاكرة نواة غير كافية كانت متاحة و \fIsig\fP هي إشارة زمن حقيقي. .TP \fBEINVAL\fP تم تحديد معرف خيط أو معرف مجموعة خيوط أو إشارة غير صالحة. .TP \fBEPERM\fP تم رفض الإذن. للأذونات المطلوبة، انظر \fBkill\fP(2). .TP \fBESRCH\fP لا توجد عملية بمعرف الخيط المحدد (ومعرف مجموعة الخيوط). .SH المعايير لينكس. .SH التاريخ .TP \fBtkill\fP() لينكس 2.4.19 / 2.5.4. .TP \fBtgkill\fP() لينكس 2.5.75، glibc 2.30. .SH ملاحظات انظر وصف \fBCLONE_THREAD\fP في \fBclone\fP(2) لشرح مجموعات الخيوط. .SH "انظر أيضًا" \fBclone\fP(2), \fBgettid\fP(2), \fBkill\fP(2), \fBrt_sigqueueinfo\fP(2) .PP .SH ترجمة تُرجمت هذه الصفحة من الدليل بواسطة زايد السعيدي . .PP هذه الترجمة هي وثيقة مجانية؛ راجع .UR https://www.gnu.org/licenses/gpl-3.0.html رخصة جنو العامة الإصدار 3 .UE أو ما بعده للاطلاع على شروط حقوق النشر. لا توجد أي ضمانات. .PP إذا وجدت أي أخطاء في ترجمة صفحة الدليل هذه، يرجى إرسال بريد إلكتروني إلى قائمة بريد المترجمين: .MT kde-l10n-ar@kde.org .ME .