@@ -611,6 +611,7 @@ msgid ""
611611"the fd to wake up when a signal arrives, but then they differ in how they "
612612"determine *which* signal or signals have arrived."
613613msgstr ""
614+ "使用此函数有两种通常的方式。 在两种方式下,当有信号到达时你都是用 fd 来唤醒,但之后它们在确定达到的一个或多个信号 *which* 时存在差异。"
614615
615616#: ../../library/signal.rst:465
616617msgid ""
@@ -622,6 +623,9 @@ msgid ""
622623"then you should set ``warn_on_full_buffer=True``, which will at least cause "
623624"a warning to be printed to stderr when signals are lost."
624625msgstr ""
626+ "在第一种方式下,我们从 fd 的缓冲区读取数据,这些字节值会给你信号编号。 这种方式很简单,但在少数情况下会发生问题:通常 fd "
627+ "将有缓冲区空间大小限制,如果信号到达得太多且太快,缓冲区可能会爆满,有些信号可能丢失。 如果你使用此方式,则你应当设置 "
628+ "``warn_on_full_buffer=True``,当信号丢失时这至少能将警告消息打印到 stderr。"
625629
626630#: ../../library/signal.rst:474
627631msgid ""
@@ -632,34 +636,42 @@ msgid ""
632636"``warn_on_full_buffer=False``, so that your users are not confused by "
633637"spurious warning messages."
634638msgstr ""
639+ "在第二种方式下,我们 *只会* 将唤醒 fd 用于唤醒,而忽略实际的字节值。 在此情况下,我们所关心的只有 fd "
640+ "的缓冲区为空还是不为空;爆满的缓冲区完全不会导致问题。 如果你使用此方式,则你应当设置 "
641+ "``warn_on_full_buffer=False``,这样你的用户就不会被虚假的警告消息所迷惑。"
635642
636643#: ../../library/signal.rst:481
637644msgid "On Windows, the function now also supports socket handles."
638- msgstr ""
645+ msgstr "在 Windows 上,此函数现在也支持套接字处理。 "
639646
640647#: ../../library/signal.rst:484
641648msgid "Added ``warn_on_full_buffer`` parameter."
642- msgstr ""
649+ msgstr "添加了 ``warn_on_full_buffer`` 形参。 "
643650
644651#: ../../library/signal.rst:489
645652msgid ""
646653"Change system call restart behaviour: if *flag* is :const:`False`, system "
647654"calls will be restarted when interrupted by signal *signalnum*, otherwise "
648655"system calls will be interrupted. Returns nothing."
649656msgstr ""
657+ "更改系统调用重启行为:如果 *flag* 为 :const:`False`,系统调用将在被信号 *signalnum* "
658+ "中断时重启,否则系统调用将被中断。 返回空值。"
650659
651660#: ../../library/signal.rst:495
652661msgid ""
653662":ref:`Availability <availability>`: Unix. See the man page "
654663":manpage:`siginterrupt(3)` for further information."
655664msgstr ""
665+ ":ref:`可用性 <availability>`: Unix。 更多信息请参见手册页面 :manpage:`siginterrupt(3)`。"
656666
657667#: ../../library/signal.rst:496
658668msgid ""
659669"Note that installing a signal handler with :func:`signal` will reset the "
660670"restart behaviour to interruptible by implicitly calling "
661671":c:func:`siginterrupt` with a true *flag* value for the given signal."
662672msgstr ""
673+ "请注意用 :func:`signal` 安装信号处理程序将重启行为重置为可通过显式调用 :c:func:`siginterrupt` 并为给定信号的 "
674+ "*flag* 设置真值来实现中断。"
663675
664676#: ../../library/signal.rst:503
665677msgid ""
@@ -670,6 +682,10 @@ msgid ""
670682":func:`getsignal` above). (See the Unix man page :manpage:`signal(2)` for "
671683"further information.)"
672684msgstr ""
685+ "将信号 *signalnum* 的处理程序设为函数 *handler*。 *handler* 可以为接受两个参数(见下)的 Python "
686+ "可调用对象,或者为特殊值 :const:`signal.SIG_IGN` 或 :const:`signal.SIG_DFL` 之一。 "
687+ "之前的信号处理程序将被返回(参见上文 :func:`getsignal` 的描述)。 (更多信息请参阅 Unix 手册页面 "
688+ ":manpage:`signal(2)`。)"
673689
674690#: ../../library/signal.rst:513
675691msgid ""
@@ -678,6 +694,8 @@ msgid ""
678694"objects, see the :ref:`description in the type hierarchy <frame-objects>` or"
679695" see the attribute descriptions in the :mod:`inspect` module)."
680696msgstr ""
697+ "*handler* 将附带两个参数调用:信号编号和当前堆栈帧 (``None`` 或一个帧对象;有关帧对象的描述请参阅 :ref:`类型层级结构描述 "
698+ "<frame-objects>` 或者参阅 :mod:`inspect` 模块中的属性描述)。"
681699
682700#: ../../library/signal.rst:518
683701msgid ""
0 commit comments