diff --git a/library/signal.po b/library/signal.po index ca7802204d..6119c47a3f 100644 --- a/library/signal.po +++ b/library/signal.po @@ -27,11 +27,11 @@ msgstr "**原始碼:**\\ :source:`Lib/signal.py`" #: ../../library/signal.rst:11 msgid "This module provides mechanisms to use signal handlers in Python." -msgstr "" +msgstr "本模組提供於 Python 中使用訊號處理程式的機制。" #: ../../library/signal.rst:15 msgid "General rules" -msgstr "" +msgstr "一般規則" #: ../../library/signal.rst:17 msgid "" @@ -42,6 +42,10 @@ msgid "" "translated into a :exc:`KeyboardInterrupt` exception if the parent process " "has not changed it." msgstr "" +":func:`signal.signal` 函式允許定義自訂的處理程式,會在收到訊號時執行。我們安" +"裝了少數的預設處理程式::const:`SIGPIPE` 會被忽略 (所以管道和 socket 上的寫入" +"錯誤可以當作一般的 Python 例外報告),而 :const:`SIGINT`\\ (如果父行程沒有改" +"變它的話)會被轉換成 :exc:`KeyboardInterrupt` 例外。" #: ../../library/signal.rst:24 msgid "" @@ -50,6 +54,9 @@ msgid "" "underlying implementation), with the exception of the handler for :const:" "`SIGCHLD`, which follows the underlying implementation." msgstr "" +"特定訊號的處理程式一旦被設定,就會一直被安裝,直到被明確地重設為止 (不管底層" +"的實作為何,Python 皆模擬出 BSD 風格的介面),但 :const:`SIGCHLD` 的處理程式除" +"外,它會跟隨底層的實作。" #: ../../library/signal.rst:29 msgid "" @@ -57,10 +64,12 @@ msgid "" "differently. Several functions and signals are not available on these " "platforms." msgstr "" +"在 WebAssembly 平台上,訊號是模擬出來的,故行為不同。有幾個函式和訊號在這些平" +"台上是不可用的。" #: ../../library/signal.rst:34 msgid "Execution of Python signal handlers" -msgstr "" +msgstr "Python 訊號處理程式的執行" #: ../../library/signal.rst:36 msgid "" @@ -70,6 +79,10 @@ msgid "" "handler at a later point(for example at the next :term:`bytecode` " "instruction). This has consequences:" msgstr "" +"Python 訊號處理程式不會在低階(C 語言)訊號處理程式中執行。相反地,低階訊號處" +"理程式會設定一個旗標,告訴\\ :term:`虛擬機 `\\ 在稍後執行相" +"對應的 Python 訊號處理程式(例如在下一個 :term:`bytecode` 指令)。這會有一些" +"後果:" #: ../../library/signal.rst:42 msgid "" @@ -80,6 +93,10 @@ msgid "" "onwards, you can use the :mod:`faulthandler` module to report on synchronous " "errors." msgstr "" +"捕捉像 :const:`SIGFPE` 或 :const:`SIGSEGV` 這類由 C 程式碼中無效操作所引起的" +"同步錯誤是沒有意義的。Python 將從訊號處理程式中回傳到 C 程式碼,而 C 程式碼很" +"可能再次引發相同的訊號,導致 Python 明顯假當機 (hang)。從 Python 3.3 開始,你" +"可以使用 :mod:`faulthandler` 模組來報告同步錯誤。" #: ../../library/signal.rst:49 msgid "" @@ -88,6 +105,9 @@ msgid "" "arbitrary amount of time, regardless of any signals received. The Python " "signal handlers will be called when the calculation finishes." msgstr "" +"純粹以 C 實作的長時間計算(例如在大量文字上的正規表示式比對)可能會不間斷地運" +"行任意長度的時間而不考慮收到的任何訊號。當計算完成時,Python 訊號處理程式會被" +"呼叫。" #: ../../library/signal.rst:54 msgid "" @@ -95,10 +115,12 @@ msgid "" "the main thread. See the :ref:`note below ` for a " "discussion." msgstr "" +"如果處理程式引發例外,就會在主執行緒中「憑空」產生例外。請參閱\\ :ref:`下面的" +"說明 `。" #: ../../library/signal.rst:62 msgid "Signals and threads" -msgstr "" +msgstr "訊號和執行緒" #: ../../library/signal.rst:64 msgid "" @@ -108,12 +130,15 @@ msgid "" "You can use the synchronization primitives from the :mod:`threading` module " "instead." msgstr "" +"Python 訊號處理程式總是在主直譯器的主 Python 執行緒中執行,即使訊號是在另一個" +"執行緒中接收到的。這意味著訊號不能用來做為執行緒間通訊的方式。你可以使用 :" +"mod:`threading` 模組的同步原語 (synchronization primitive) 來代替。" #: ../../library/signal.rst:69 msgid "" "Besides, only the main thread of the main interpreter is allowed to set a " "new signal handler." -msgstr "" +msgstr "此外,只有主直譯器的主執行緒才被允許設定新的訊號處理程式。" #: ../../library/signal.rst:73 msgid "Module contents" @@ -129,27 +154,36 @@ msgid "" "`sigwait` functions return human-readable :class:`enums ` as :" "class:`Signals` objects." msgstr "" +"下面列出的訊號 (SIG*)、處理器(:const:`SIG_DFL`、:const:`SIG_IGN`)和訊號遮" +"罩 (sigmask)(:const:`SIG_BLOCK`、:const:`SIG_UNBLOCK`、:const:" +"`SIG_SETMASK`)的相關常數被轉換成 :class:`enums `\\ (:class:" +"`Signals`、:class:`Handlers` 和 :class:`Sigmasks`)。:func:`getsignal`、:" +"func:`pthread_sigmask`、:func:`sigpending` 和 :func:`sigwait` 函式會回傳可被" +"人類閱讀的\\ :class:`枚舉 `\\ 作為 :class:`Signals` 物件。" #: ../../library/signal.rst:85 msgid "The signal module defines three enums:" -msgstr "" +msgstr "訊號模組定義了三個枚舉:" #: ../../library/signal.rst:89 msgid "" ":class:`enum.IntEnum` collection of SIG* constants and the CTRL_* constants." -msgstr "" +msgstr "SIG* 常數和 CTRL_* 常數的 :class:`enum.IntEnum` 集合。" #: ../../library/signal.rst:95 msgid "" ":class:`enum.IntEnum` collection the constants :const:`SIG_DFL` and :const:" "`SIG_IGN`." msgstr "" +":const:`SIG_DFL` 和 :const:`SIG_IGN` 常數的 :class:`enum.IntEnum` 集合。" #: ../../library/signal.rst:101 msgid "" ":class:`enum.IntEnum` collection the constants :const:`SIG_BLOCK`, :const:" "`SIG_UNBLOCK` and :const:`SIG_SETMASK`." msgstr "" +":const:`SIG_BLOCK`、:const:`SIG_UNBLOCK` 和 :const:`SIG_SETMASK` 常數的 :" +"class:`enum.IntEnum` 集合。" #: ../../library/signal.rst:103 ../../library/signal.rst:136 #: ../../library/signal.rst:142 ../../library/signal.rst:148 @@ -173,12 +207,12 @@ msgid "" "See the man page :manpage:`sigprocmask(2)` and :manpage:`pthread_sigmask(3)` " "for further information." msgstr "" -"更多資訊請見 :manpage:`sigprocmask(2)` 與 :manpage:`pthread_sigmask(3)` 手冊" -"頁。" +"更多資訊請見 :manpage:`sigprocmask(2)` 與 :manpage:`pthread_sigmask(3)` 線上" +"手冊。" #: ../../library/signal.rst:111 msgid "The variables defined in the :mod:`signal` module are:" -msgstr "" +msgstr "在 :mod:`signal` 模組中定義的變數有:" #: ../../library/signal.rst:116 msgid "" @@ -187,32 +221,35 @@ msgid "" "default action for :const:`SIGQUIT` is to dump core and exit, while the " "default action for :const:`SIGCHLD` is to simply ignore it." msgstr "" +"這是兩種標準訊號處理選項之一;它會簡單地執行訊號的預設功能。例如,在大多數系" +"統上,:const:`SIGQUIT` 的預設動作是轉儲 (dump) 核心並退出,而 :const:" +"`SIGCHLD` 的預設動作是直接忽略。" #: ../../library/signal.rst:124 msgid "" "This is another standard signal handler, which will simply ignore the given " "signal." -msgstr "" +msgstr "這是另一個標準的訊號處理程式,會直接忽略給定的訊號。" #: ../../library/signal.rst:130 msgid "Abort signal from :manpage:`abort(3)`." -msgstr "" +msgstr "來自 :manpage:`abort(3)` 的中止訊號。" #: ../../library/signal.rst:134 msgid "Timer signal from :manpage:`alarm(2)`." -msgstr "" +msgstr "來自 :manpage:`alarm(2)` 的計時器訊號。" #: ../../library/signal.rst:140 msgid "Interrupt from keyboard (CTRL + BREAK)." -msgstr "" +msgstr "從鍵盤中斷 (CTRL + BREAK)。" #: ../../library/signal.rst:146 msgid "Bus error (bad memory access)." -msgstr "" +msgstr "匯流排錯誤(記憶體存取不良)。" #: ../../library/signal.rst:152 msgid "Child process stopped or terminated." -msgstr "" +msgstr "子行程停止或終止。" #: ../../library/signal.rst:158 msgid "Alias to :data:`SIGCHLD`." @@ -220,82 +257,87 @@ msgstr ":data:`SIGCHLD` 的別名。" #: ../../library/signal.rst:164 msgid "Continue the process if it is currently stopped" -msgstr "" +msgstr "如果目前行程是被停止的,則繼續運行" #: ../../library/signal.rst:170 msgid "Floating-point exception. For example, division by zero." -msgstr "" +msgstr "浮點運算例外。例如除以零。" #: ../../library/signal.rst:173 msgid "" ":exc:`ZeroDivisionError` is raised when the second argument of a division or " "modulo operation is zero." msgstr "" +":exc:`ZeroDivisionError` 會在除法或模運算 (modulo operation) 的第二個引數為零" +"時引發。" #: ../../library/signal.rst:178 msgid "" "Hangup detected on controlling terminal or death of controlling process." -msgstr "" +msgstr "偵測到控制終端機掛斷 (hangup) 或控制行程死亡。" #: ../../library/signal.rst:184 msgid "Illegal instruction." -msgstr "" +msgstr "非法指令。" #: ../../library/signal.rst:188 msgid "Interrupt from keyboard (CTRL + C)." -msgstr "" +msgstr "從鍵盤中斷 (CTRL + C)。" #: ../../library/signal.rst:190 msgid "Default action is to raise :exc:`KeyboardInterrupt`." -msgstr "" +msgstr "預設動作是引發 :exc:`KeyboardInterrupt`。" #: ../../library/signal.rst:194 msgid "Kill signal." -msgstr "" +msgstr "殺死訊號。" #: ../../library/signal.rst:196 msgid "It cannot be caught, blocked, or ignored." -msgstr "" +msgstr "它無法被捕捉、阻擋或忽略。" #: ../../library/signal.rst:202 msgid "Broken pipe: write to pipe with no readers." -msgstr "" +msgstr "管道中斷 (broken pipe):寫到沒有讀取器 (reader) 的管道。" #: ../../library/signal.rst:204 msgid "Default action is to ignore the signal." -msgstr "" +msgstr "預設動作是忽略訊號。" #: ../../library/signal.rst:210 msgid "Segmentation fault: invalid memory reference." -msgstr "" +msgstr "記憶體區段錯誤 (segmentation fault):無效記憶體參照。" #: ../../library/signal.rst:214 msgid "" "Stack fault on coprocessor. The Linux kernel does not raise this signal: it " "can only be raised in user space." msgstr "" +"輔助處理器 (coprocessor) 上的堆疊錯誤 (stack fault)。Linux 核心不會引發此訊" +"號:它只能在使用者空間 (user space) 中引發。" #: ../../library/signal.rst:219 msgid "" "On architectures where the signal is available. See the man page :manpage:" "`signal(7)` for further information." msgstr "" +"在訊號可用的架構上。請參閱 :manpage:`signal(7)` 線上手冊以取得更多資訊。" #: ../../library/signal.rst:226 msgid "Termination signal." -msgstr "" +msgstr "終止訊號。" #: ../../library/signal.rst:230 msgid "User-defined signal 1." -msgstr "" +msgstr "使用者定義訊號 1。" #: ../../library/signal.rst:236 msgid "User-defined signal 2." -msgstr "" +msgstr "使用者定義訊號 2。" #: ../../library/signal.rst:242 msgid "Window resize signal." -msgstr "" +msgstr "視窗調整大小訊號。" #: ../../library/signal.rst:248 msgid "" @@ -307,36 +349,46 @@ msgid "" "`signal(7)`). Note that not all systems define the same set of signal names; " "only those names defined by the system are defined by this module." msgstr "" +"所有的訊號編號都是以符號定義的。例如,掛斷訊號被定義為 :const:`signal." +"SIGHUP`;變數名稱與 C 程式中使用的名稱相同,可在 ```` 中找到。Unix " +"線上手冊 ':c:func:`signal`' 列出了現有的訊號(在某些系統上是 :manpage:" +"`signal(2)`,在其他系統上是在 :manpage:`signal(7)` 中)。請注意,並非所有系統" +"都會定義同一套訊號名稱;只有那些由系統所定義的名稱才會由這個模組定義。" #: ../../library/signal.rst:259 msgid "" "The signal corresponding to the :kbd:`Ctrl+C` keystroke event. This signal " "can only be used with :func:`os.kill`." msgstr "" +"與 :kbd:`Ctrl+C` 擊鍵 (keystroke) 事件相對應的訊號。此訊號只能與 :func:`os." +"kill` 搭配使用。" #: ../../library/signal.rst:269 msgid "" "The signal corresponding to the :kbd:`Ctrl+Break` keystroke event. This " "signal can only be used with :func:`os.kill`." msgstr "" +"與 :kbd:`Ctrl+Break` 擊鍵事件相對應的訊號。此訊號只能與 :func:`os.kill` 搭配" +"使用。" #: ../../library/signal.rst:279 msgid "" "One more than the number of the highest signal number. Use :func:" "`valid_signals` to get valid signal numbers." msgstr "" +"比最高編號訊號的編號多一。使用 :func:`valid_signals` 來取得有效的訊號編號。" #: ../../library/signal.rst:285 msgid "" "Decrements interval timer in real time, and delivers :const:`SIGALRM` upon " "expiration." -msgstr "" +msgstr "即時減少間隔計時器 (interval timer),並在到期時送出 :const:`SIGALRM`。" #: ../../library/signal.rst:291 msgid "" "Decrements interval timer only when the process is executing, and delivers " "SIGVTALRM upon expiration." -msgstr "" +msgstr "僅在執行行程時遞減間隔計時器,並在到期時傳送 SIGVTALRM。" #: ../../library/signal.rst:297 msgid "" @@ -345,28 +397,33 @@ msgid "" "timer is usually used to profile the time spent by the application in user " "and kernel space. SIGPROF is delivered upon expiration." msgstr "" +"當行程執行或系統代表行程執行時,都會減少間隔計時器。與 ITIMER_VIRTUAL 配合," +"這個計時器通常用來分析 (profile) 應用程式在使用者空間與核心空間 (kernel " +"space) 所花費的時間。SIGPROF 會在到期時傳送。" #: ../../library/signal.rst:305 msgid "" "A possible value for the *how* parameter to :func:`pthread_sigmask` " "indicating that signals are to be blocked." -msgstr "" +msgstr ":func:`pthread_sigmask` 的 *how* 參數的可能值,表示訊號將被阻檔。" #: ../../library/signal.rst:312 msgid "" "A possible value for the *how* parameter to :func:`pthread_sigmask` " "indicating that signals are to be unblocked." -msgstr "" +msgstr ":func:`pthread_sigmask` 的 *how* 參數的可能值,表示訊號將被解除阻檔。" #: ../../library/signal.rst:319 msgid "" "A possible value for the *how* parameter to :func:`pthread_sigmask` " "indicating that the signal mask is to be replaced." msgstr "" +":func:`pthread_sigmask` 的 *how* 參數的可能值,表示訊號遮罩 (signal mask) 要" +"被取代。" #: ../../library/signal.rst:325 msgid "The :mod:`signal` module defines one exception:" -msgstr "" +msgstr ":mod:`signal` 模組定義了一個例外:" #: ../../library/signal.rst:329 msgid "" @@ -375,16 +432,19 @@ msgid "" "or a negative time is passed to :func:`setitimer`. This error is a subtype " "of :exc:`OSError`." msgstr "" +"當 :func:`setitimer` 或 :func:`getitimer` 底層實作發生錯誤時引發訊號。如果傳" +"給 :func:`setitimer` 的是無效的間隔計時器或負數時間,則預期會發生此錯誤。這個" +"錯誤是 :exc:`OSError` 的子型別。" #: ../../library/signal.rst:334 msgid "" "This error used to be a subtype of :exc:`IOError`, which is now an alias of :" "exc:`OSError`." -msgstr "" +msgstr "此錯誤過去是 :exc:`IOError` 的子型別,現在是 :exc:`OSError` 的別名。" #: ../../library/signal.rst:339 msgid "The :mod:`signal` module defines the following functions:" -msgstr "" +msgstr ":mod:`signal` 模組定義了下列函式:" #: ../../library/signal.rst:344 msgid "" @@ -396,10 +456,15 @@ msgid "" "alarm is canceled. If the return value is zero, no alarm is currently " "scheduled." msgstr "" +"如果 *time* 非零,則此函式會要求在 *time* 秒後傳送 :const:`SIGALRM` 訊號給該" +"行程。任何先前排程 (scheduled) 的警報都會被取消(任何時候都只能排程一個警" +"報)。回傳值是先前設定的警報原本再等多久就會被傳送的秒數。如果 *time* 為零," +"則不會去排程任何警報,且已排程的警報會被取消。如果回傳值為零,則代表目前未排" +"程任何警報。" #: ../../library/signal.rst:353 msgid "See the man page :manpage:`alarm(2)` for further information." -msgstr "更多資訊請見 :manpage:`alarm(2)` 手冊頁。" +msgstr "更多資訊請見 :manpage:`alarm(2)` 線上手冊。" #: ../../library/signal.rst:358 msgid "" @@ -411,6 +476,11 @@ msgid "" "previously in use, and ``None`` means that the previous signal handler was " "not installed from Python." msgstr "" +"回傳訊號 *signalnum* 的目前訊號處理程式。回傳值可以是一個可呼叫的 Python 物" +"件,或是特殊值 :const:`signal.SIG_IGN`、:const:`signal.SIG_DFL` 或 :const:" +"`None` 之一。這裡的 :const:`signal.SIG_IGN` 表示訊號先前被忽略,:const:" +"`signal.SIG_DFL` 表示訊號先前使用預設的處理方式,而 ``None`` 表示先前的訊號處" +"理程式並未從 Python 安裝。" #: ../../library/signal.rst:369 msgid "" @@ -418,6 +488,9 @@ msgid "" "const:`SIGINT`. Returns :const:`None` if *signalnum* has no description. " "Raises :exc:`ValueError` if *signalnum* is invalid." msgstr "" +"回傳訊號 *signalnum* 的描述,例如 :const:`SIGINT` 的 \"Interrupt\"。如果 " +"*signalnum* 沒有描述,則回傳 :const:`None`。如果 *signalnum* 無效則會引發 :" +"exc:`ValueError`。" #: ../../library/signal.rst:378 msgid "" @@ -425,26 +498,30 @@ msgid "" "than ``range(1, NSIG)`` if some signals are reserved by the system for " "internal use." msgstr "" +"回傳此平台上的有效訊號編號集合。如果某些訊號被系統保留作為內部使用,則此值可" +"能小於 ``range(1, NSIG)``。" #: ../../library/signal.rst:387 msgid "" "Cause the process to sleep until a signal is received; the appropriate " "handler will then be called. Returns nothing." -msgstr "" +msgstr "使行程休眠,直到接收到訊號;然後呼叫適當的處理程式。不會回傳任何東西。" #: ../../library/signal.rst:392 msgid "See the man page :manpage:`signal(2)` for further information." -msgstr "更多資訊請見 :manpage:`signal(2)` 手冊頁。" +msgstr "更多資訊請見 :manpage:`signal(2)` 線上手冊。" #: ../../library/signal.rst:394 msgid "" "See also :func:`sigwait`, :func:`sigwaitinfo`, :func:`sigtimedwait` and :" "func:`sigpending`." msgstr "" +"也請見 :func:`sigwait`、:func:`sigwaitinfo`、:func:`sigtimedwait` 和 :func:" +"`sigpending`。" #: ../../library/signal.rst:400 msgid "Sends a signal to the calling process. Returns nothing." -msgstr "" +msgstr "傳送訊號至呼叫的行程。不會回傳任何東西。" #: ../../library/signal.rst:407 msgid "" @@ -453,10 +530,12 @@ msgid "" "``None``. The *flags* argument is provided for future extensions; no flag " "values are currently defined." msgstr "" +"傳送訊號 *sig* 到檔案描述器 *pidfd* 所指的行程。Python 目前不支援 *siginfo* " +"參數;它必須是 ``None``。*flags* 引數是提供給未來的擴充;目前沒有定義旗標值。" #: ../../library/signal.rst:412 msgid "See the :manpage:`pidfd_send_signal(2)` man page for more information." -msgstr "更多資訊請見 :manpage:`pidfd_send_signal(2)` 手冊頁。" +msgstr "更多資訊請見 :manpage:`pidfd_send_signal(2)` 線上手冊。" #: ../../library/signal.rst:420 msgid "" @@ -468,6 +547,11 @@ msgid "" "point of sending a signal to a particular Python thread would be to force a " "running system call to fail with :exc:`InterruptedError`." msgstr "" +"將訊號 *signalnum* 傳送給與呼叫者在同一行程中的另一個執行緒 *thread_id*。目標" +"執行緒能執行任何程式碼(無論為 Python 與否)。但是,如果目標執行緒正執行 " +"Python 直譯器,Python 訊號處理程式將會\\ :ref:`由主直譯器的主執行緒來執行 " +"`。因此,向特定 Python 執行緒發送訊號的唯一意義是強制執" +"行中的系統呼叫以 :exc:`InterruptedError` 方式失敗。" #: ../../library/signal.rst:428 msgid "" @@ -475,12 +559,16 @@ msgid "" "attribute of :class:`threading.Thread` objects to get a suitable value for " "*thread_id*." msgstr "" +"使用 :func:`threading.get_ident` 或 :class:`threading.Thread` 物件的 :attr:" +"`~threading.Thread.ident` 屬性來取得 *thread_id* 的適當值。" #: ../../library/signal.rst:432 msgid "" "If *signalnum* is 0, then no signal is sent, but error checking is still " "performed; this can be used to check if the target thread is still running." msgstr "" +"如果 *signalnum* 為 0,則不會傳送訊號,但仍會執行錯誤檢查;這可用來檢查目標執" +"行緒是否仍在執行。" #: ../../library/signal.rst:435 msgid "" @@ -492,7 +580,7 @@ msgstr "" #: ../../library/signal.rst:439 msgid "See the man page :manpage:`pthread_kill(3)` for further information." -msgstr "更多資訊請見 :manpage:`pthread_kill(3)` 手冊頁。" +msgstr "更多資訊請見 :manpage:`pthread_kill(3)` 線上手冊。" #: ../../library/signal.rst:441 msgid "See also :func:`os.kill`." @@ -504,17 +592,20 @@ msgid "" "is the set of signals whose delivery is currently blocked for the caller. " "Return the old signal mask as a set of signals." msgstr "" +"擷取和/或變更呼叫執行緒的訊號遮罩。訊號遮罩是目前阻擋呼叫者傳送的訊號集合。將" +"舊的訊號遮罩作為一組訊號集合回傳。" #: ../../library/signal.rst:452 msgid "" "The behavior of the call is dependent on the value of *how*, as follows." -msgstr "" +msgstr "呼叫的行為取決於 *how* 的值,如下所示。" #: ../../library/signal.rst:454 msgid "" ":data:`SIG_BLOCK`: The set of blocked signals is the union of the current " "set and the *mask* argument." msgstr "" +":data:`SIG_BLOCK`:被阻檔的訊號集合是目前訊號集合與 *mask* 引數的聯集。" #: ../../library/signal.rst:456 msgid "" @@ -522,12 +613,14 @@ msgid "" "of blocked signals. It is permissible to attempt to unblock a signal which " "is not blocked." msgstr "" +":data:`SIG_UNBLOCK`:將 *mask* 中的訊號從目前阻檔的訊號集合中移除。嘗試為未被" +"阻檔的訊號解除阻檔是允許的。" #: ../../library/signal.rst:459 msgid "" ":data:`SIG_SETMASK`: The set of blocked signals is set to the *mask* " "argument." -msgstr "" +msgstr ":data:`SIG_SETMASK`:將被阻檔的訊號集合設定為 *mask* 引數。" #: ../../library/signal.rst:462 msgid "" @@ -535,16 +628,21 @@ msgid "" "`signal.SIGTERM`}). Use :func:`~signal.valid_signals` for a full mask " "including all signals." msgstr "" +"*mask* 是一組訊號編號(例如 {:const:`signal.SIGINT`, :const:`signal." +"SIGTERM`})的集合。使用 :func:`~signal.valid_signals` 來取得包含所有訊號的完" +"整遮罩。" #: ../../library/signal.rst:466 msgid "" "For example, ``signal.pthread_sigmask(signal.SIG_BLOCK, [])`` reads the " "signal mask of the calling thread." msgstr "" +"例如,``signal.pthread_sigmask(signal.SIG_BLOCK, [])`` 會讀取呼叫執行緒的訊號" +"遮罩。" #: ../../library/signal.rst:469 msgid ":data:`SIGKILL` and :data:`SIGSTOP` cannot be blocked." -msgstr "" +msgstr ":data:`SIGKILL` 和 :data:`SIGSTOP` 不能被阻檔。" #: ../../library/signal.rst:476 msgid "See also :func:`pause`, :func:`sigpending` and :func:`sigwait`."