11# SOME DESCRIPTIVE TITLE.
2- # Copyright (C) 2001-2023 , Python Software Foundation
2+ # Copyright (C) 2001-2024 , Python Software Foundation
33# This file is distributed under the same license as the Python package.
44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
@@ -11,7 +11,7 @@ msgid ""
1111msgstr ""
1212"Project-Id-Version : Python 3.11\n "
1313"Report-Msgid-Bugs-To : \n "
14- "POT-Creation-Date : 2023-11-03 14:47 +0000\n "
14+ "POT-Creation-Date : 2024-03-01 16:38 +0000\n "
1515"PO-Revision-Date : 2023-05-24 02:15+0000\n "
1616"
Last-Translator :
Rafael Fontenelle <[email protected] >, 2023\n "
1717"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -27,13 +27,11 @@ msgstr ":mod:`fcntl` —— 系统调用 ``fcntl`` 和 ``ioctl``"
2727
2828#: ../../library/fcntl.rst:16
2929msgid ""
30- "This module performs file control and I/O control on file descriptors. It is"
31- " an interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines. For "
32- " a complete description of these calls, see :manpage:`fcntl(2)` and "
33- ":manpage:`ioctl(2)` Unix manual pages ."
30+ "This module performs file and I/O control on file descriptors. It is an "
31+ "interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines. See the "
32+ ":manpage:`fcntl(2)` and :manpage:`ioctl(2)` Unix manual pages for full "
33+ "details ."
3434msgstr ""
35- "本模块基于文件描述符来进行文件控制和 I/O 控制。它是 Unix 系统调用 :c:func:`fcntl` 和 :c:func:`ioctl` "
36- "的接口。关于这些调用的完整描述,请参阅 Unix 手册的 :manpage:`fcntl(2)` 和 :manpage:`ioctl(2)` 页面。"
3735
3836#: ../../library/fcntl.rst:21
3937msgid ":ref:`Availability <availability>`: Unix, not Emscripten, not WASI."
@@ -127,8 +125,8 @@ msgstr ""
127125"1024 字节,很可能导致内存段冲突,或更为不易察觉的数据错误。"
128126
129127#: ../../library/fcntl.rst:77
130- msgid "If the :c:func:`fcntl` fails, an :exc:`OSError` is raised."
131- msgstr "如果 :c:func:`fcntl` 调用失败,会触发 :exc:`OSError` 。 "
128+ msgid "If the :c:func:`fcntl` call fails, an :exc:`OSError` is raised."
129+ msgstr ""
132130
133131#: ../../library/fcntl.rst:79
134132msgid ""
@@ -201,8 +199,9 @@ msgstr ""
201199":func:`ioctl` ,然后把结果复制回给出的缓冲区去。"
202200
203201#: ../../library/fcntl.rst:115
204- msgid "If the :c:func:`ioctl` fails, an :exc:`OSError` exception is raised."
205- msgstr "如果 :c:func:`ioctl` 调用失败,则会触发 :exc:`OSError` 异常。"
202+ msgid ""
203+ "If the :c:func:`ioctl` call fails, an :exc:`OSError` exception is raised."
204+ msgstr ""
206205
207206#: ../../library/fcntl.rst:117
208207msgid "An example::"
@@ -227,8 +226,9 @@ msgstr ""
227226"详见 Unix 手册 :manpage:`flock(2)`。 (在某些系统中,此函数是用 :c:func:`fcntl` 模拟出来的。)"
228227
229228#: ../../library/fcntl.rst:140
230- msgid "If the :c:func:`flock` fails, an :exc:`OSError` exception is raised."
231- msgstr "如果 :c:func:`flock` 调用失败,就会触发 :exc:`OSError` 异常。"
229+ msgid ""
230+ "If the :c:func:`flock` call fails, an :exc:`OSError` exception is raised."
231+ msgstr ""
232232
233233#: ../../library/fcntl.rst:142
234234msgid ""
@@ -247,35 +247,35 @@ msgstr ""
247247"本质上是对 :func:`~fcntl.fcntl` 加锁调用的封装。*fd* 是要加解锁的文件描述符(也接受能提供 "
248248":meth:`~io.IOBase.fileno` 方法的文件对象),*cmd* 是以下值之一:"
249249
250- #: ../../library/fcntl.rst:152
251- msgid ":const:`LOCK_UN` -- unlock "
252- msgstr ":const:`LOCK_UN` ——解锁 "
250+ #: ../../library/fcntl.rst:154
251+ msgid "Release an existing lock. "
252+ msgstr ""
253253
254- #: ../../library/fcntl.rst:153
255- msgid ":const:`LOCK_SH` -- acquire a shared lock"
256- msgstr ":const:`LOCK_SH` —— 获取一个共享锁 "
254+ #: ../../library/fcntl.rst:158
255+ msgid "Acquire a shared lock. "
256+ msgstr ""
257257
258- #: ../../library/fcntl.rst:154
259- msgid ":const:`LOCK_EX` -- acquire an exclusive lock"
260- msgstr ":const:`LOCK_EX` —— 获取一个独占锁 "
258+ #: ../../library/fcntl.rst:162
259+ msgid "Acquire an exclusive lock. "
260+ msgstr ""
261261
262- #: ../../library/fcntl.rst:156
262+ #: ../../library/fcntl.rst:166
263+ msgid ""
264+ "Bitwise OR with any of the other three ``LOCK_*`` constants to make the "
265+ "request non-blocking."
266+ msgstr ""
267+
268+ #: ../../library/fcntl.rst:169
263269msgid ""
264- "When *cmd* is :const:`LOCK_SH` or :const:`LOCK_EX`, it can also be bitwise "
265- "ORed with :const:`LOCK_NB` to avoid blocking on lock acquisition. If "
266- ":const:`LOCK_NB` is used and the lock cannot be acquired, an :exc:`OSError` "
267- "will be raised and the exception will have an *errno* attribute set to "
268- ":const:`EACCES` or :const:`EAGAIN` (depending on the operating system; for "
269- "portability, check for both values). On at least some systems, "
270- ":const:`LOCK_EX` can only be used if the file descriptor refers to a file "
271- "opened for writing."
270+ "If :const:`!LOCK_NB` is used and the lock cannot be acquired, an "
271+ ":exc:`OSError` will be raised and the exception will have an *errno* "
272+ "attribute set to :const:`~errno.EACCES` or :const:`~errno.EAGAIN` (depending"
273+ " on the operating system; for portability, check for both values). On at "
274+ "least some systems, :const:`!LOCK_EX` can only be used if the file "
275+ "descriptor refers to a file opened for writing."
272276msgstr ""
273- "如果 *cmd* 为 :const:`LOCK_SH` 或 :const:`LOCK_EX`,则还可以与 :const:`LOCK_NB` "
274- "进行按位或运算,以避免在获取锁时出现阻塞。 如果用了 :const:`LOCK_NB`,无法获取锁时将触发 :exc:`OSError`,此异常的 "
275- "*errno* 属性将被设为 :const:`EACCES` 或 :const:`EAGAIN` (视操作系统而定;为了保证可移植性,请检查这两个值)。"
276- " 至少在某些系统上,只有当文件描述符指向需要写入而打开的文件时,才可以使用 :const:`LOCK_EX`。"
277277
278- #: ../../library/fcntl.rst:165
278+ #: ../../library/fcntl.rst:176
279279msgid ""
280280"*len* is the number of bytes to lock, *start* is the byte offset at which "
281281"the lock starts, relative to *whence*, and *whence* is as with "
@@ -284,40 +284,40 @@ msgstr ""
284284"*len* 是要锁定的字节数,*start* 是自 *whence* 开始锁定的字节偏移量,*whence* 与 "
285285":func:`io.IOBase.seek` 的定义一样。"
286286
287- #: ../../library/fcntl.rst:169
287+ #: ../../library/fcntl.rst:180
288288msgid "``0`` -- relative to the start of the file (:const:`os.SEEK_SET`)"
289289msgstr "``0`` -- 相对于文件开头 (:const:`os.SEEK_SET`)"
290290
291- #: ../../library/fcntl.rst:170
291+ #: ../../library/fcntl.rst:181
292292msgid ""
293293"``1`` -- relative to the current buffer position (:const:`os.SEEK_CUR`)"
294294msgstr "``1`` -- 相对于当前缓冲区位置 (:const:`os.SEEK_CUR`)"
295295
296- #: ../../library/fcntl.rst:171
296+ #: ../../library/fcntl.rst:182
297297msgid "``2`` -- relative to the end of the file (:const:`os.SEEK_END`)"
298298msgstr "``2`` -- 相对于文件末尾 (:const:`os.SEEK_END`)"
299299
300- #: ../../library/fcntl.rst:173
300+ #: ../../library/fcntl.rst:184
301301msgid ""
302302"The default for *start* is 0, which means to start at the beginning of the "
303303"file. The default for *len* is 0 which means to lock to the end of the file."
304304" The default for *whence* is also 0."
305305msgstr ""
306306"*start* 的默认值为 0,表示从文件起始位置开始。*len* 的默认值是 0,表示加锁至文件末尾。 *whence* 的默认值也是 0。"
307307
308- #: ../../library/fcntl.rst:177
308+ #: ../../library/fcntl.rst:188
309309msgid ""
310310"Raises an :ref:`auditing event <auditing>` ``fcntl.lockf`` with arguments "
311311"``fd``, ``cmd``, ``len``, ``start``, ``whence``."
312312msgstr ""
313313"触发一条 :ref:`审计事件 <auditing>` ``fcntl.lockf``,参数为 ``fd`` 、 ``cmd``、 ``len``、 "
314314"``start``、 ``whence``。"
315315
316- #: ../../library/fcntl.rst:179
316+ #: ../../library/fcntl.rst:190
317317msgid "Examples (all on a SVR4 compliant system)::"
318318msgstr "示例(都是运行于符合 SVR4 的系统):"
319319
320- #: ../../library/fcntl.rst:189
320+ #: ../../library/fcntl.rst:200
321321msgid ""
322322"Note that in the first example the return value variable *rv* will hold an "
323323"integer value; in the second example it will hold a :class:`bytes` object. "
@@ -327,11 +327,11 @@ msgstr ""
327327"注意,在第一个例子中,返回值变量 *rv* 将存有整数;在第二个例子中,该变量中将存有一个 :class:`bytes` 对象。*lockdata* "
328328"变量的结构布局视系统而定——因此采用 :func:`flock` 调用可能会更好。"
329329
330- #: ../../library/fcntl.rst:200
330+ #: ../../library/fcntl.rst:211
331331msgid "Module :mod:`os`"
332332msgstr "模块 :mod:`os`"
333333
334- #: ../../library/fcntl.rst:198
334+ #: ../../library/fcntl.rst:209
335335msgid ""
336336"If the locking flags :const:`~os.O_SHLOCK` and :const:`~os.O_EXLOCK` are "
337337"present in the :mod:`os` module (on BSD only), the :func:`os.open` function "
@@ -340,7 +340,7 @@ msgstr ""
340340"如果加锁旗标 :const:`~os.O_SHLOCK` 和 :const:`~os.O_EXLOCK` 存在于 :mod:`os` 模块中(仅 BSD"
341341" 专属),则 :func:`os.open` 函数提供了对 :func:`lockf` 和 :func:`flock` 函数的替代。"
342342
343- #: ../../library/fcntl.rst:10 ../../library/fcntl.rst:10
343+ #: ../../library/fcntl.rst:10
344344msgid "UNIX"
345345msgstr "UNIX"
346346
0 commit comments