Debian Codegraph @

templates/man3/getcwd.3.pot

raw
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2026-06-05 06:25+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, no-wrap
23 msgid "getcwd"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
28 #: opensuse-tumbleweed
29 #, no-wrap
30 msgid "2026-02-08"
31 msgstr ""
32
33 #. type: TH
34 #: archlinux debian-unstable
35 #, no-wrap
36 msgid "Linux man-pages 6.18"
37 msgstr ""
38
39 #. type: SH
40 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
41 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
42 #, no-wrap
43 msgid "NAME"
44 msgstr ""
45
46 #. type: Plain text
47 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
48 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
49 msgid "getcwd, getwd, get_current_dir_name - get current working directory"
50 msgstr ""
51
52 #. type: SH
53 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
54 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
55 #, no-wrap
56 msgid "LIBRARY"
57 msgstr ""
58
59 #. type: Plain text
60 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
61 #: opensuse-leap-16-1 opensuse-tumbleweed
62 msgid "Standard C library (I<libc>,\\ I<-lc>)"
63 msgstr ""
64
65 #. type: SH
66 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
67 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
68 #, no-wrap
69 msgid "SYNOPSIS"
70 msgstr ""
71
72 #. type: Plain text
73 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
74 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
75 #, no-wrap
76 msgid "B<#include E<lt>unistd.hE<gt>>\n"
77 msgstr ""
78
79 #. type: Plain text
80 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
81 #: opensuse-tumbleweed
82 #, no-wrap
83 msgid ""
84 "B<char *getcwd(>size_t size;\n"
85 "B< char >I<buf>B<[>I<size>B<], size_t >I<size>B<);>\n"
86 "B<char *get_current_dir_name(void);>\n"
87 msgstr ""
88
89 #. type: Plain text
90 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
91 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
92 #, no-wrap
93 msgid "B<[[deprecated]] char *getwd(char >I<buf>B<[PATH_MAX]);>\n"
94 msgstr ""
95
96 #. type: Plain text
97 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
98 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
99 msgid ""
100 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
101 msgstr ""
102
103 #. type: Plain text
104 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
105 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
106 msgid "B<get_current_dir_name>():"
107 msgstr ""
108
109 #. type: Plain text
110 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
111 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
112 #, no-wrap
113 msgid " _GNU_SOURCE\n"
114 msgstr ""
115
116 #. type: Plain text
117 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
118 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
119 msgid "B<getwd>():"
120 msgstr ""
121
122 #. || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
123 #. type: Plain text
124 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
125 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
126 #, no-wrap
127 msgid ""
128 " Since glibc 2.12:\n"
129 " (_XOPEN_SOURCE E<gt>= 500) && ! (_POSIX_C_SOURCE E<gt>= 200809L)\n"
130 " || /* glibc E<gt>= 2.19: */ _DEFAULT_SOURCE\n"
131 " || /* glibc E<lt>= 2.19: */ _BSD_SOURCE\n"
132 " Before glibc 2.12:\n"
133 " _BSD_SOURCE || _XOPEN_SOURCE E<gt>= 500\n"
134 msgstr ""
135
136 #. type: SH
137 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
138 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
139 #, no-wrap
140 msgid "DESCRIPTION"
141 msgstr ""
142
143 #. type: Plain text
144 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
145 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
146 msgid ""
147 "These functions return a null-terminated string containing an absolute "
148 "pathname that is the current working directory of the calling process. The "
149 "pathname is returned as the function result and via the argument I<buf>, if "
150 "present."
151 msgstr ""
152
153 #. type: Plain text
154 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
155 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
156 msgid ""
157 "The B<getcwd>() function copies an absolute pathname of the current working "
158 "directory to the array pointed to by I<buf>, which is of length I<size>."
159 msgstr ""
160
161 #. type: Plain text
162 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
163 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
164 msgid ""
165 "If the length of the absolute pathname of the current working directory, "
166 "including the terminating null byte, exceeds I<size> bytes, NULL is "
167 "returned, and I<errno> is set to B<ERANGE>; an application should check for "
168 "this error, and allocate a larger buffer if necessary."
169 msgstr ""
170
171 #. type: Plain text
172 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
173 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
174 msgid ""
175 "As an extension to the POSIX.1-2001 standard, glibc's B<getcwd>() allocates "
176 "the buffer dynamically using B<malloc>(3) if I<buf> is NULL. In this case, "
177 "the allocated buffer has the length I<size> unless I<size> is zero, when "
178 "I<buf> is allocated as big as necessary. The caller should B<free>(3) the "
179 "returned buffer."
180 msgstr ""
181
182 #. type: Plain text
183 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
184 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
185 msgid ""
186 "B<get_current_dir_name>() will B<malloc>(3) an array big enough to hold "
187 "the absolute pathname of the current working directory. If the environment "
188 "variable B<PWD> is set, and its value is correct, then that value will be "
189 "returned. The caller should B<free>(3) the returned buffer."
190 msgstr ""
191
192 #. type: Plain text
193 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
194 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
195 msgid ""
196 "B<getwd>() does not B<malloc>(3) any memory. The I<buf> argument should "
197 "be a pointer to an array at least B<PATH_MAX> bytes long. If the length of "
198 "the absolute pathname of the current working directory, including the "
199 "terminating null byte, exceeds B<PATH_MAX> bytes, NULL is returned, and "
200 "I<errno> is set to B<ENAMETOOLONG>. (Note that on some systems, B<PATH_MAX> "
201 "may not be a compile-time constant; furthermore, its value may depend on the "
202 "filesystem, see B<pathconf>(3).) For portability and security reasons, use "
203 "of B<getwd>() is deprecated."
204 msgstr ""
205
206 #. type: SH
207 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
208 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
209 #, no-wrap
210 msgid "RETURN VALUE"
211 msgstr ""
212
213 #. type: Plain text
214 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
215 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
216 msgid ""
217 "On success, these functions return a pointer to a string containing the "
218 "pathname of the current working directory. In the case of B<getcwd>() and "
219 "B<getwd>() this is the same value as I<buf>."
220 msgstr ""
221
222 #. type: Plain text
223 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
224 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
225 msgid ""
226 "On failure, these functions return NULL, and I<errno> is set to indicate the "
227 "error. The contents of the array pointed to by I<buf> are undefined on "
228 "error."
229 msgstr ""
230
231 #. type: SH
232 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
233 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
234 #, no-wrap
235 msgid "ERRORS"
236 msgstr ""
237
238 #. type: TP
239 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
240 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
241 #, no-wrap
242 msgid "B<EACCES>"
243 msgstr ""
244
245 #. type: Plain text
246 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
247 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
248 msgid "Permission to read or search a component of the filename was denied."
249 msgstr ""
250
251 #. type: TP
252 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
253 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
254 #, no-wrap
255 msgid "B<EFAULT>"
256 msgstr ""
257
258 #. type: Plain text
259 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
260 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
261 msgid "I<buf> points to a bad address."
262 msgstr ""
263
264 #. type: TP
265 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
266 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
267 #, no-wrap
268 msgid "B<EINVAL>"
269 msgstr ""
270
271 #. type: Plain text
272 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
273 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
274 msgid "The I<size> argument is zero and I<buf> is not a null pointer."
275 msgstr ""
276
277 #. type: Plain text
278 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
279 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
280 msgid "B<getwd>(): I<buf> is NULL."
281 msgstr ""
282
283 #. type: TP
284 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
285 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
286 #, no-wrap
287 msgid "B<ENAMETOOLONG>"
288 msgstr ""
289
290 #. type: Plain text
291 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
292 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
293 msgid ""
294 "B<getwd>(): The size of the null-terminated absolute pathname string exceeds "
295 "B<PATH_MAX> bytes."
296 msgstr ""
297
298 #. type: TP
299 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
300 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
301 #, no-wrap
302 msgid "B<ENOENT>"
303 msgstr ""
304
305 #. type: Plain text
306 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
307 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
308 msgid "The current working directory has been unlinked."
309 msgstr ""
310
311 #. type: TP
312 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
313 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
314 #, no-wrap
315 msgid "B<ENOMEM>"
316 msgstr ""
317
318 #. type: Plain text
319 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
320 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
321 msgid "Out of memory."
322 msgstr ""
323
324 #. type: TP
325 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
326 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
327 #, no-wrap
328 msgid "B<ERANGE>"
329 msgstr ""
330
331 #. type: Plain text
332 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
333 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
334 msgid ""
335 "The I<size> argument is less than the length of the absolute pathname of the "
336 "working directory, including the terminating null byte. You need to "
337 "allocate a bigger array and try again."
338 msgstr ""
339
340 #. type: SH
341 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
342 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
343 #, no-wrap
344 msgid "ATTRIBUTES"
345 msgstr ""
346
347 #. type: Plain text
348 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
349 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
350 msgid ""
351 "For an explanation of the terms used in this section, see B<attributes>(7)."
352 msgstr ""
353
354 #. type: tbl table
355 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
356 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
357 #, no-wrap
358 msgid "Interface"
359 msgstr ""
360
361 #. type: tbl table
362 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
363 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
364 #, no-wrap
365 msgid "Attribute"
366 msgstr ""
367
368 #. type: tbl table
369 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
370 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
371 #, no-wrap
372 msgid "Value"
373 msgstr ""
374
375 #. type: tbl table
376 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
377 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
378 #, no-wrap
379 msgid ".na\n"
380 msgstr ""
381
382 #. type: tbl table
383 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
384 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
385 #, no-wrap
386 msgid ".nh\n"
387 msgstr ""
388
389 #. type: tbl table
390 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
391 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
392 #, no-wrap
393 msgid ""
394 "B<getcwd>(),\n"
395 "B<getwd>()"
396 msgstr ""
397
398 #. type: tbl table
399 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
400 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
401 #, no-wrap
402 msgid "Thread safety"
403 msgstr ""
404
405 #. type: tbl table
406 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
407 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
408 #, no-wrap
409 msgid "MT-Safe"
410 msgstr ""
411
412 #. type: TP
413 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
414 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
415 #, no-wrap
416 msgid "B<get_current_dir_name>()"
417 msgstr ""
418
419 #. type: tbl table
420 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
421 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
422 #, no-wrap
423 msgid "MT-Safe env"
424 msgstr ""
425
426 #. type: SH
427 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
428 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
429 #, no-wrap
430 msgid "VERSIONS"
431 msgstr ""
432
433 #. type: Plain text
434 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
435 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
436 msgid ""
437 "POSIX.1-2001 leaves the behavior of B<getcwd>() unspecified if I<buf> is "
438 "NULL."
439 msgstr ""
440
441 #. type: Plain text
442 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
443 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
444 msgid "POSIX.1-2001 does not define any errors for B<getwd>()."
445 msgstr ""
446
447 #. type: SS
448 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
449 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
450 #, no-wrap
451 msgid "C library/kernel differences"
452 msgstr ""
453
454 #. commit 3272c544da48f8915a0e34189182aed029bd0f2b
455 #. type: Plain text
456 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
457 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
458 msgid ""
459 "On Linux, the kernel provides a B<getcwd>() system call, which the "
460 "functions described in this page will use if possible. The system call "
461 "takes the same arguments as the library function of the same name, but is "
462 "limited to returning at most B<PATH_MAX> bytes. (Before Linux 3.12, the "
463 "limit on the size of the returned pathname was the system page size. On "
464 "many architectures, B<PATH_MAX> and the system page size are both 4096 "
465 "bytes, but a few architectures have a larger page size.) If the length of "
466 "the pathname of the current working directory exceeds this limit, then the "
467 "system call fails with the error B<ENAMETOOLONG>. In this case, the library "
468 "functions fall back to a (slower) alternative implementation that returns "
469 "the full pathname."
470 msgstr ""
471
472 #. commit 8df9d1a4142311c084ffeeacb67cd34d190eff74
473 #. type: Plain text
474 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
475 #: opensuse-leap-16-1 opensuse-tumbleweed
476 msgid ""
477 "Following a change in Linux 2.6.36, the pathname returned by the "
478 "B<getcwd>() system call will be prefixed with the string \"(unreachable)\" "
479 "if the current directory is not below the root directory of the current "
480 "process (e.g., because the process set a new filesystem root using "
481 "B<chroot>(2) without changing its current directory into the new root). "
482 "Such behavior can also be caused by an unprivileged user by changing the "
483 "current directory into another mount namespace. When dealing with pathnames "
484 "from untrusted sources, callers of the functions described in this page "
485 "(before glibc 2.27) or the raw B<getcwd>() system call should consider "
486 "checking whether the returned pathname starts with '/' or '(' to avoid "
487 "misinterpreting an unreachable path as a relative pathname."
488 msgstr ""
489
490 #. type: SH
491 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
492 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
493 #, no-wrap
494 msgid "STANDARDS"
495 msgstr ""
496
497 #. type: TP
498 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
499 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
500 #, no-wrap
501 msgid "B<getcwd>()"
502 msgstr ""
503
504 #. type: Plain text
505 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
506 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
507 msgid "POSIX.1-2008."
508 msgstr ""
509
510 #. type: Plain text
511 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
512 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
513 msgid "GNU."
514 msgstr ""
515
516 #. type: TP
517 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
518 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
519 #, no-wrap
520 msgid "B<getwd>()"
521 msgstr ""
522
523 #. type: Plain text
524 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
525 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
526 msgid "None."
527 msgstr ""
528
529 #. type: SH
530 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
531 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
532 #, no-wrap
533 msgid "HISTORY"
534 msgstr ""
535
536 #. type: Plain text
537 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
538 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
539 msgid "POSIX.1-2001."
540 msgstr ""
541
542 #. type: Plain text
543 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
544 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
545 msgid ""
546 "POSIX.1-2001, but marked LEGACY. Removed in POSIX.1-2008. Use B<getcwd>() "
547 "instead."
548 msgstr ""
549
550 #. type: Plain text
551 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
552 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
553 msgid ""
554 "Under Linux, these functions make use of the B<getcwd>() system call "
555 "(available since Linux 2.1.92). On older systems they would query I</proc/"
556 "self/cwd>. If both system call and proc filesystem are missing, a generic "
557 "implementation is called. Only in that case can these calls fail under "
558 "Linux with B<EACCES>."
559 msgstr ""
560
561 #. type: SH
562 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
563 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
564 #, no-wrap
565 msgid "NOTES"
566 msgstr ""
567
568 #. type: Plain text
569 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
570 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
571 msgid ""
572 "These functions are often used to save the location of the current working "
573 "directory for the purpose of returning to it later. Opening the current "
574 "directory (\".\") and calling B<fchdir>(2) to return is usually a faster "
575 "and more reliable alternative when sufficiently many file descriptors are "
576 "available, especially on platforms other than Linux."
577 msgstr ""
578
579 #. type: SH
580 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
581 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
582 #, no-wrap
583 msgid "BUGS"
584 msgstr ""
585
586 #. type: Plain text
587 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
588 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
589 msgid ""
590 "Since the Linux 2.6.36 change that added \"(unreachable)\" in the "
591 "circumstances described above, the glibc implementation of B<getcwd>() has "
592 "failed to conform to POSIX and returned a relative pathname when the API "
593 "contract requires an absolute pathname. With glibc 2.27 onwards this is "
594 "corrected; calling B<getcwd>() from such a pathname will now result in "
595 "failure with B<ENOENT>."
596 msgstr ""
597
598 #. type: SH
599 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
600 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
601 #, no-wrap
602 msgid "SEE ALSO"
603 msgstr ""
604
605 #. type: Plain text
606 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
607 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
608 msgid ""
609 "B<pwd>(1), B<chdir>(2), B<fchdir>(2), B<open>(2), B<unlink>(2), B<free>(3), "
610 "B<malloc>(3)"
611 msgstr ""
612
613 #. type: TH
614 #: debian-trixie
615 #, no-wrap
616 msgid "2024-05-02"
617 msgstr ""
618
619 #. type: TH
620 #: debian-trixie
621 #, no-wrap
622 msgid "Linux man-pages 6.9.1"
623 msgstr ""
624
625 #. type: Plain text
626 #: debian-trixie
627 msgid "Standard C library (I<libc>, I<-lc>)"
628 msgstr ""
629
630 #. type: Plain text
631 #: debian-trixie fedora-44 fedora-rawhide
632 #, no-wrap
633 msgid ""
634 "B<char *getcwd(char >I<buf>B<[.>I<size>B<], size_t >I<size>B<);>\n"
635 "B<char *get_current_dir_name(void);>\n"
636 msgstr ""
637
638 #. commit 8df9d1a4142311c084ffeeacb67cd34d190eff74
639 #. type: Plain text
640 #: debian-trixie
641 msgid ""
642 "Following a change in Linux 2.6.36, the pathname returned by the "
643 "B<getcwd>() system call will be prefixed with the string \"(unreachable)\" "
644 "if the current directory is not below the root directory of the current "
645 "process (e.g., because the process set a new filesystem root using "
646 "B<chroot>(2) without changing its current directory into the new root). "
647 "Such behavior can also be caused by an unprivileged user by changing the "
648 "current directory into another mount namespace. When dealing with pathname "
649 "from untrusted sources, callers of the functions described in this page "
650 "should consider checking whether the returned pathname starts with '/' or "
651 "'(' to avoid misinterpreting an unreachable path as a relative pathname."
652 msgstr ""
653
654 #. type: TH
655 #: fedora-44 fedora-rawhide
656 #, no-wrap
657 msgid "2025-02-20"
658 msgstr ""
659
660 #. type: TH
661 #: fedora-44 fedora-rawhide
662 #, no-wrap
663 msgid "Linux man-pages 6.13"
664 msgstr ""
665
666 #. type: TH
667 #: mageia-cauldron
668 #, no-wrap
669 msgid "Linux man-pages 6.17"
670 msgstr ""
671
672 #. type: TH
673 #: opensuse-leap-16-1 opensuse-tumbleweed
674 #, no-wrap
675 msgid "Linux man-pages (unreleased)"
676 msgstr ""