6
6
msgstr ""
7
7
"Project-Id-Version :Python 3.12\n "
8
8
"Report-Msgid-Bugs-To :\n "
9
- "POT-Creation-Date :2024-04-18 00:04+0000\n "
9
+ "POT-Creation-Date :2024-04-29 00:04+0000\n "
10
10
"PO-Revision-Date :2018-05-23 16:01+0000\n "
11
11
"Last-Translator :Adrian Liaw <adrianliaw2000@gmail.com>\n "
12
12
"Language-Team :Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -25,215 +25,216 @@ msgstr ""
25
25
msgid ""
26
26
"This module contains functions to dump Python tracebacks explicitly, on a "
27
27
"fault, after a timeout, or on a user signal. Call :func:`faulthandler."
28
- "enable` to install fault handlers for the :const:`SIGSEGV`, :const:"
29
- "`SIGFPE`, :const:`SIGABRT`, :const:`SIGBUS`, and :const:`SIGILL` signals. "
30
- "You can also enable them at startup bysetting the :envvar: "
31
- "`PYTHONFAULTHANDLER` environment variable or by using the :option:`-X` "
32
- "``faulthandler`` command line option."
28
+ "enable` to install fault handlers for the :const:`~signal. SIGSEGV`, :const:"
29
+ "`~signal. SIGFPE`, :const:`~signal. SIGABRT`, :const:`~signal. SIGBUS`, and :"
30
+ "const:`~signal.SIGILL` signals. You can also enable them at startup by "
31
+ "setting the :envvar: `PYTHONFAULTHANDLER` environment variable or by using "
32
+ "the :option:`-X` ``faulthandler`` command line option."
33
33
msgstr ""
34
34
35
- #: ../../library/faulthandler.rst:18
35
+ #: ../../library/faulthandler.rst:19
36
36
msgid ""
37
37
"The fault handler is compatible with system fault handlers like Apport or "
38
38
"the Windows fault handler. The module uses an alternative stack for signal "
39
- "handlers if the :c:func:`sigaltstack` function is available. This allows it "
39
+ "handlers if the :c:func:`! sigaltstack` function is available. This allows it "
40
40
"to dump the traceback even on a stack overflow."
41
41
msgstr ""
42
42
43
- #: ../../library/faulthandler.rst:23
43
+ #: ../../library/faulthandler.rst:24
44
44
msgid ""
45
45
"The fault handler is called on catastrophic cases and therefore can only use "
46
46
"signal-safe functions (e.g. it cannot allocate memory on the heap). Because "
47
47
"of this limitation traceback dumping is minimal compared to normal Python "
48
48
"tracebacks:"
49
49
msgstr ""
50
50
51
- #: ../../library/faulthandler.rst:28
51
+ #: ../../library/faulthandler.rst:29
52
52
msgid ""
53
53
"Only ASCII is supported. The ``backslashreplace`` error handler is used on "
54
54
"encoding."
55
55
msgstr ""
56
56
57
- #: ../../library/faulthandler.rst:30
57
+ #: ../../library/faulthandler.rst:31
58
58
msgid "Each string is limited to 500 characters."
59
59
msgstr ""
60
60
61
- #: ../../library/faulthandler.rst:31
61
+ #: ../../library/faulthandler.rst:32
62
62
msgid ""
63
63
"Only the filename, the function name and the line number are displayed. (no "
64
64
"source code)"
65
65
msgstr ""
66
66
67
- #: ../../library/faulthandler.rst:33
67
+ #: ../../library/faulthandler.rst:34
68
68
msgid "It is limited to 100 frames and 100 threads."
69
69
msgstr ""
70
70
71
- #: ../../library/faulthandler.rst:34
71
+ #: ../../library/faulthandler.rst:35
72
72
msgid "The order is reversed: the most recent call is shown first."
73
73
msgstr ""
74
74
75
- #: ../../library/faulthandler.rst:36
75
+ #: ../../library/faulthandler.rst:37
76
76
msgid ""
77
77
"By default, the Python traceback is written to :data:`sys.stderr`. To see "
78
78
"tracebacks, applications must be run in the terminal. A log file can "
79
79
"alternatively be passed to :func:`faulthandler.enable`."
80
80
msgstr ""
81
81
82
- #: ../../library/faulthandler.rst:40
82
+ #: ../../library/faulthandler.rst:41
83
83
msgid ""
84
84
"The module is implemented in C, so tracebacks can be dumped on a crash or "
85
85
"when Python is deadlocked."
86
86
msgstr ""
87
87
88
- #: ../../library/faulthandler.rst:43
88
+ #: ../../library/faulthandler.rst:44
89
89
msgid ""
90
90
"The :ref:`Python Development Mode <devmode>` calls :func:`faulthandler."
91
91
"enable` at Python startup."
92
92
msgstr ""
93
93
94
- #: ../../library/faulthandler.rst:48
94
+ #: ../../library/faulthandler.rst:49
95
95
msgid "Module :mod:`pdb`"
96
96
msgstr ":mod:`pdb` 模組"
97
97
98
- #: ../../library/faulthandler.rst:49
98
+ #: ../../library/faulthandler.rst:50
99
99
msgid "Interactive source code debugger for Python programs."
100
100
msgstr ""
101
101
102
- #: ../../library/faulthandler.rst:51
102
+ #: ../../library/faulthandler.rst:52
103
103
msgid "Module :mod:`traceback`"
104
104
msgstr ":mod:`traceback` 模組"
105
105
106
- #: ../../library/faulthandler.rst:52
106
+ #: ../../library/faulthandler.rst:53
107
107
msgid ""
108
108
"Standard interface to extract, format and print stack traces of Python "
109
109
"programs."
110
110
msgstr ""
111
111
112
- #: ../../library/faulthandler.rst:55
112
+ #: ../../library/faulthandler.rst:56
113
113
msgid "Dumping the traceback"
114
114
msgstr ""
115
115
116
- #: ../../library/faulthandler.rst:59
116
+ #: ../../library/faulthandler.rst:60
117
117
msgid ""
118
118
"Dump the tracebacks of all threads into *file*. If *all_threads* is "
119
119
"``False``, dump only the current thread."
120
120
msgstr ""
121
121
122
- #: ../../library/faulthandler.rst:62
122
+ #: ../../library/faulthandler.rst:63
123
123
msgid ""
124
124
":func:`traceback.print_tb`, which can be used to print a traceback object."
125
125
msgstr ""
126
126
127
- #: ../../library/faulthandler.rst:64 ../../library/faulthandler.rst:82
128
- #: ../../library/faulthandler.rst:121 ../../library/faulthandler.rst:146
127
+ #: ../../library/faulthandler.rst:65 ../../library/faulthandler.rst:84
128
+ #: ../../library/faulthandler.rst:123 ../../library/faulthandler.rst:148
129
129
msgid "Added support for passing file descriptor to this function."
130
130
msgstr ""
131
131
132
- #: ../../library/faulthandler.rst:69
132
+ #: ../../library/faulthandler.rst:70
133
133
msgid "Fault handler state"
134
134
msgstr ""
135
135
136
- #: ../../library/faulthandler.rst:73
136
+ #: ../../library/faulthandler.rst:74
137
137
msgid ""
138
- "Enable the fault handler: install handlers for the :const:`SIGSEGV`, :const:"
139
- "`SIGFPE`, :const:`SIGABRT`, :const:`SIGBUS` and :const:`SIGILL` signals to "
140
- "dump the Python traceback. If *all_threads* is ``True``, produce tracebacks "
141
- "for every running thread. Otherwise, dump only the current thread."
138
+ "Enable the fault handler: install handlers for the :const:`~signal."
139
+ "SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal."
140
+ "SIGBUS` and :const:`~signal.SIGILL` signals to dump the Python traceback. If "
141
+ "*all_threads* is ``True``, produce tracebacks for every running thread. "
142
+ "Otherwise, dump only the current thread."
142
143
msgstr ""
143
144
144
- #: ../../library/faulthandler.rst:79
145
+ #: ../../library/faulthandler.rst:81
145
146
msgid ""
146
147
"The *file* must be kept open until the fault handler is disabled: see :ref:"
147
148
"`issue with file descriptors <faulthandler-fd>`."
148
149
msgstr ""
149
150
150
- #: ../../library/faulthandler.rst:85
151
+ #: ../../library/faulthandler.rst:87
151
152
msgid "On Windows, a handler for Windows exception is also installed."
152
153
msgstr ""
153
154
154
- #: ../../library/faulthandler.rst:88
155
+ #: ../../library/faulthandler.rst:90
155
156
msgid ""
156
157
"The dump now mentions if a garbage collector collection is running if "
157
158
"*all_threads* is true."
158
159
msgstr ""
159
160
160
- #: ../../library/faulthandler.rst:94
161
+ #: ../../library/faulthandler.rst:96
161
162
msgid ""
162
163
"Disable the fault handler: uninstall the signal handlers installed by :func:"
163
164
"`enable`."
164
165
msgstr ""
165
166
166
- #: ../../library/faulthandler.rst:99
167
+ #: ../../library/faulthandler.rst:101
167
168
msgid "Check if the fault handler is enabled."
168
169
msgstr ""
169
170
170
- #: ../../library/faulthandler.rst:103
171
+ #: ../../library/faulthandler.rst:105
171
172
msgid "Dumping the tracebacks after a timeout"
172
173
msgstr ""
173
174
174
- #: ../../library/faulthandler.rst:107
175
+ #: ../../library/faulthandler.rst:109
175
176
msgid ""
176
177
"Dump the tracebacks of all threads, after a timeout of *timeout* seconds, or "
177
178
"every *timeout* seconds if *repeat* is ``True``. If *exit* is ``True``, "
178
- "call :c:func:`_exit` with status=1 after dumping the tracebacks. (Note :c:"
179
- "func:`_exit` exits the process immediately, which means it doesn't do any "
179
+ "call :c:func:`! _exit` with status=1 after dumping the tracebacks. (Note :c:"
180
+ "func:`! _exit` exits the process immediately, which means it doesn't do any "
180
181
"cleanup like flushing file buffers.) If the function is called twice, the "
181
182
"new call replaces previous parameters and resets the timeout. The timer has "
182
183
"a sub-second resolution."
183
184
msgstr ""
184
185
185
- #: ../../library/faulthandler.rst:115
186
+ #: ../../library/faulthandler.rst:117
186
187
msgid ""
187
188
"The *file* must be kept open until the traceback is dumped or :func:"
188
189
"`cancel_dump_traceback_later` is called: see :ref:`issue with file "
189
190
"descriptors <faulthandler-fd>`."
190
191
msgstr ""
191
192
192
- #: ../../library/faulthandler.rst:119
193
+ #: ../../library/faulthandler.rst:121
193
194
msgid "This function is implemented using a watchdog thread."
194
195
msgstr ""
195
196
196
- #: ../../library/faulthandler.rst:124
197
+ #: ../../library/faulthandler.rst:126
197
198
msgid "This function is now always available."
198
199
msgstr ""
199
200
200
- #: ../../library/faulthandler.rst:129
201
+ #: ../../library/faulthandler.rst:131
201
202
msgid "Cancel the last call to :func:`dump_traceback_later`."
202
203
msgstr ""
203
204
204
- #: ../../library/faulthandler.rst:133
205
+ #: ../../library/faulthandler.rst:135
205
206
msgid "Dumping the traceback on a user signal"
206
207
msgstr ""
207
208
208
- #: ../../library/faulthandler.rst:137
209
+ #: ../../library/faulthandler.rst:139
209
210
msgid ""
210
211
"Register a user signal: install a handler for the *signum* signal to dump "
211
212
"the traceback of all threads, or of the current thread if *all_threads* is "
212
213
"``False``, into *file*. Call the previous handler if chain is ``True``."
213
214
msgstr ""
214
215
215
- #: ../../library/faulthandler.rst:141
216
+ #: ../../library/faulthandler.rst:143
216
217
msgid ""
217
218
"The *file* must be kept open until the signal is unregistered by :func:"
218
219
"`unregister`: see :ref:`issue with file descriptors <faulthandler-fd>`."
219
220
msgstr ""
220
221
221
- #: ../../library/faulthandler.rst:144 ../../library/faulthandler.rst:155
222
+ #: ../../library/faulthandler.rst:146 ../../library/faulthandler.rst:157
222
223
msgid "Not available on Windows."
223
224
msgstr ""
224
225
225
- #: ../../library/faulthandler.rst:151
226
+ #: ../../library/faulthandler.rst:153
226
227
msgid ""
227
228
"Unregister a user signal: uninstall the handler of the *signum* signal "
228
229
"installed by :func:`register`. Return ``True`` if the signal was registered, "
229
230
"``False`` otherwise."
230
231
msgstr ""
231
232
232
- #: ../../library/faulthandler.rst:161
233
+ #: ../../library/faulthandler.rst:163
233
234
msgid "Issue with file descriptors"
234
235
msgstr ""
235
236
236
- #: ../../library/faulthandler.rst:163
237
+ #: ../../library/faulthandler.rst:165
237
238
msgid ""
238
239
":func:`enable`, :func:`dump_traceback_later` and :func:`register` keep the "
239
240
"file descriptor of their *file* argument. If the file is closed and its file "
@@ -242,11 +243,11 @@ msgid ""
242
243
"Call these functions again each time that the file is replaced."
243
244
msgstr ""
244
245
245
- #: ../../library/faulthandler.rst:171
246
+ #: ../../library/faulthandler.rst:173
246
247
msgid "Example"
247
248
msgstr "範例"
248
249
249
- #: ../../library/faulthandler.rst:173
250
+ #: ../../library/faulthandler.rst:175
250
251
msgid ""
251
252
"Example of a segmentation fault on Linux with and without enabling the fault "
252
253
"handler:"