Debian Codegraph @

po/ru/man2/gethostname.2.po

raw
1 # Russian translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Azamat Hackimov <[email protected]>, 2013-2014, 2017.
5 # Dmitry Bolkhovskikh <[email protected]>, 2017.
6 # Vladislav <[email protected]>, 2015.
7 # Yuri Kozlov <[email protected]>, 2011-2019.
8 # Иван Павлов <[email protected]>, 2017, 2019.
9 msgid ""
10 msgstr ""
11 "Project-Id-Version: manpages-l10n\n"
12 "POT-Creation-Date: 2026-06-05 06:25+0200\n"
13 "PO-Revision-Date: 2024-12-21 19:49+0300\n"
14 "Last-Translator: Yuri Kozlov <[email protected]>\n"
15 "Language-Team: Russian <[email protected]>\n"
16 "Language: ru\n"
17 "MIME-Version: 1.0\n"
18 "Content-Type: text/plain; charset=UTF-8\n"
19 "Content-Transfer-Encoding: 8bit\n"
20 "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
21 "n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || "
22 "(n%100>=11 && n%100<=14)? 2 : 3);\n"
23 "X-Generator: Lokalize 2.0\n"
24
25 #. type: TH
26 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
27 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
28 #, no-wrap
29 msgid "gethostname"
30 msgstr "gethostname"
31
32 #. type: TH
33 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
34 #: opensuse-tumbleweed
35 #, no-wrap
36 msgid "2026-02-08"
37 msgstr "8 февраля 2026 г."
38
39 #. type: TH
40 #: archlinux debian-unstable
41 #, fuzzy, no-wrap
42 #| msgid "Linux man-pages 6.17"
43 msgid "Linux man-pages 6.18"
44 msgstr "Справочные страницы Linux 6.17"
45
46 #. type: SH
47 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
48 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
49 #, no-wrap
50 msgid "NAME"
51 msgstr "НАИМЕНОВАНИЕ"
52
53 #. type: Plain text
54 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
55 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
56 msgid "gethostname, sethostname - get/set hostname"
57 msgstr "gethostname, sethostname - получить/установить имя узла"
58
59 #. type: SH
60 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
61 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
62 #, no-wrap
63 msgid "LIBRARY"
64 msgstr "БИБЛИОТЕКА"
65
66 #. type: Plain text
67 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
68 #: opensuse-leap-16-1 opensuse-tumbleweed
69 msgid "Standard C library (I<libc>,\\ I<-lc>)"
70 msgstr "Стандартная библиотека языка C (I<libc>,\\ I<-lc>)"
71
72 #. type: SH
73 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
74 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
75 #, no-wrap
76 msgid "SYNOPSIS"
77 msgstr "СИНТАКСИС"
78
79 #. type: Plain text
80 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
81 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
82 #, no-wrap
83 msgid "B<#include E<lt>unistd.hE<gt>>\n"
84 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
85
86 #. type: Plain text
87 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
88 #: opensuse-leap-16-1 opensuse-tumbleweed
89 #, fuzzy, no-wrap
90 #| msgid ""
91 #| "B<int gethostname(char *>I<name>B<, size_t >I<len>B<);>\n"
92 #| "B<int sethostname(const char *>I<name>B<, size_t >I<len>B<);>\n"
93 msgid ""
94 "B<int gethostname(char *>I<name>B<, size_t >I<size>B<);>\n"
95 "B<int sethostname(const char *>I<name>B<, size_t >I<size>B<);>\n"
96 msgstr ""
97 "B<int gethostname(char *>I<name>B<, size_t >I<len>B<);>\n"
98 "B<int sethostname(const char *>I<name>B<, size_t >I<len>B<);>\n"
99
100 #. type: Plain text
101 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
102 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
103 msgid ""
104 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
105 msgstr ""
106 "Требования макроса тестирования свойств для glibc (см. "
107 "B<feature_test_macros>(7)):"
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 msgid "B<gethostname>():"
113 msgstr "B<gethostname>():"
114
115 #. The above is something of a simplification
116 #. also before glibc 2.3 there was a bit churn
117 #. type: Plain text
118 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
119 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
120 #, fuzzy, no-wrap
121 #| msgid ""
122 #| "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L\n"
123 #| " || /* Glibc versions E<lt>= 2.19: */ _BSD_SOURCE\n"
124 msgid ""
125 " _XOPEN_SOURCE E<gt>= 500 || _POSIX_C_SOURCE E<gt>= 200112L\n"
126 " || /* glibc 2.19 and earlier */ _BSD_SOURCE\n"
127 msgstr ""
128 "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L\n"
129 " || /* в версии glibc E<lt>= 2.19: */ _BSD_SOURCE\n"
130
131 #. type: Plain text
132 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
133 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
134 msgid "B<sethostname>():"
135 msgstr "B<sethostname>():"
136
137 #. commit 266865c0e7b79d4196e2cc393693463f03c90bd8
138 #. type: Plain text
139 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
140 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
141 #, no-wrap
142 msgid ""
143 " Since glibc 2.21:\n"
144 " _DEFAULT_SOURCE\n"
145 " In glibc 2.19 and 2.20:\n"
146 " _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE E<lt> 500)\n"
147 " Up to and including glibc 2.19:\n"
148 " _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE E<lt> 500)\n"
149 msgstr ""
150 " начиная с glibc 2.21:\n"
151 " _DEFAULT_SOURCE\n"
152 " в glibc 2.19 и 2.20:\n"
153 " _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE E<lt> 500)\n"
154 " до glibc 2.19, включительно:\n"
155 " _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE E<lt> 500)\n"
156
157 #. type: SH
158 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
159 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
160 #, no-wrap
161 msgid "DESCRIPTION"
162 msgstr "ОПИСАНИЕ"
163
164 #. type: Plain text
165 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
166 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
167 msgid ""
168 "These system calls are used to access or to change the system hostname. "
169 "More precisely, they operate on the hostname associated with the calling "
170 "process's UTS namespace."
171 msgstr ""
172 "Данные системные вызовы используются для получения или изменения имени узла "
173 "системы. Точнее говоря, они работают с именем узла, связанным с "
174 "пространством имён UTS вызывающего процесса."
175
176 #. type: Plain text
177 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
178 #: opensuse-leap-16-1 opensuse-tumbleweed
179 #, fuzzy
180 #| msgid ""
181 #| "B<sethostname>() sets the hostname to the value given in the character "
182 #| "array I<name>. The I<len> argument specifies the number of bytes in "
183 #| "I<name>. (Thus, I<name> does not require a terminating null byte.)"
184 msgid ""
185 "B<sethostname>() sets the hostname to the value given in the character "
186 "array I<name>. The I<size> argument specifies the number of bytes in "
187 "I<name>. (Thus, I<name> does not require a terminating null byte.)"
188 msgstr ""
189 "Вызов B<sethostname>() устанавливает имя узла равны значению, указанному в "
190 "массиве символов I<name>. Аргумент I<len> определяет количество байт в "
191 "I<name>. (Таким образом, I<name> не требует наличия завершающего байта с "
192 "null.)"
193
194 #. type: Plain text
195 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
196 #: opensuse-leap-16-1 opensuse-tumbleweed
197 #, fuzzy
198 #| msgid ""
199 #| "B<gethostname>() returns the null-terminated hostname in the character "
200 #| "array I<name>, which has a length of I<len> bytes. If the null-"
201 #| "terminated hostname is too large to fit, then the name is truncated, and "
202 #| "no error is returned (but see NOTES below). POSIX.1 says that if such "
203 #| "truncation occurs, then it is unspecified whether the returned buffer "
204 #| "includes a terminating null byte."
205 msgid ""
206 "B<gethostname>() returns the null-terminated hostname in the character "
207 "array I<name>, which has a size of I<size> bytes. If the null-terminated "
208 "hostname is too large to fit, then the name is truncated, and no error is "
209 "returned (but see VERSIONS below). POSIX.1 says that if such truncation "
210 "occurs, then it is unspecified whether the returned buffer includes a "
211 "terminating null byte."
212 msgstr ""
213 "B<gethostname>() возвращает имя узла с null на конце в массиве символов "
214 "I<name> длиной I<len> байт. Если имя узла, оканчивающееся null, не "
215 "помещается, то имя обрезается и ошибки не происходит (но смотрите ЗАМЕЧАНИЯ "
216 "далее). В POSIX.1 сказано, что если обрезание произошло, то неясно, будет ли "
217 "буфер содержать завершающий байт с null."
218
219 #. type: SH
220 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
221 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
222 #, no-wrap
223 msgid "RETURN VALUE"
224 msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ"
225
226 #. type: Plain text
227 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
228 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
229 msgid ""
230 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
231 "to indicate the error."
232 msgstr ""
233 "При успешном выполнении возвращается 0. При ошибке возвращается -1, а в "
234 "I<errno> содержится код ошибки."
235
236 #. type: SH
237 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
238 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
239 #, no-wrap
240 msgid "ERRORS"
241 msgstr "ОШИБКИ"
242
243 #. type: TP
244 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
245 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
246 #, no-wrap
247 msgid "B<EFAULT>"
248 msgstr "B<EFAULT>"
249
250 #. type: Plain text
251 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
252 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
253 msgid "I<name> is an invalid address."
254 msgstr "I<name> является неправильным адресом. "
255
256 #. type: TP
257 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
258 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
259 #, no-wrap
260 msgid "B<EINVAL>"
261 msgstr "B<EINVAL>"
262
263 #. Can't occur for gethostbyname() wrapper, since 'size' has an
264 #. unsigned type; can occur for the underlying system call.
265 #. type: Plain text
266 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
267 #: opensuse-leap-16-1 opensuse-tumbleweed
268 #, fuzzy
269 #| msgid ""
270 #| "I<len> is negative or, for B<sethostname>(), I<len> is larger than the "
271 #| "maximum allowed size."
272 msgid ""
273 "I<size> is negative or, for B<sethostname>(), I<size> is larger than the "
274 "maximum allowed size."
275 msgstr ""
276 "I<len> имеет отрицательное значение или для B<sethostname>() длина I<len> "
277 "больше, чем максимально допустимое значение."
278
279 #. type: TP
280 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
281 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
282 #, no-wrap
283 msgid "B<ENAMETOOLONG>"
284 msgstr "B<ENAMETOOLONG>"
285
286 #. type: Plain text
287 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
288 #: opensuse-leap-16-1 opensuse-tumbleweed
289 #, fuzzy
290 #| msgid ""
291 #| "(glibc B<gethostname>()) I<len> is smaller than the actual size. "
292 #| "(Before version 2.1, glibc uses B<EINVAL> for this case.)"
293 msgid ""
294 "(glibc B<gethostname>()) I<size> is smaller than the actual size. (Before "
295 "glibc 2.1, glibc uses B<EINVAL> for this case.)"
296 msgstr ""
297 "(B<gethostname>() из glibc) I<len> меньше чем реальный размер. (До версии "
298 "2.1, glibc возвращала в этом случае B<EINVAL>.)"
299
300 #. type: TP
301 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
302 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
303 #, no-wrap
304 msgid "B<EPERM>"
305 msgstr "B<EPERM>"
306
307 #. type: Plain text
308 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
309 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
310 msgid ""
311 "For B<sethostname>(), the caller did not have the B<CAP_SYS_ADMIN> "
312 "capability in the user namespace associated with its UTS namespace (see "
313 "B<namespaces>(7))."
314 msgstr ""
315 "Для работы с B<sethostname>() у вызывающего нет мандата B<CAP_SYS_ADMIN> в "
316 "пользовательском пространстве имён, связанном с его пространством имён UTS "
317 "(смотрите B<namespaces>(7))."
318
319 #. type: SH
320 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
321 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
322 #, no-wrap
323 msgid "VERSIONS"
324 msgstr "ВЕРСИИ"
325
326 #. type: Plain text
327 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
328 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
329 msgid ""
330 "SUSv2 guarantees that \"Host names are limited to 255 bytes\". POSIX.1 "
331 "guarantees that \"Host names (not including the terminating null byte) are "
332 "limited to B<HOST_NAME_MAX> bytes\". On Linux, B<HOST_NAME_MAX> is defined "
333 "with the value 64, which has been the limit since Linux 1.0 (earlier kernels "
334 "imposed a limit of 8 bytes)."
335 msgstr ""
336 "SUSv2 гарантирует, что «Длина имени узла ограничена 255-ю байтами». POSIX.1 "
337 "гарантирует, что «Длина имени узла (не включая завершающий нулевой символ) "
338 "ограничена B<HOST_NAME_MAX> байтами». В Linux значение B<HOST_NAME_MAX> "
339 "равно 64, которое было урезано начиная с Linux 1.0 (ранние версии имели "
340 "предел в 8 байт)."
341
342 #. type: SS
343 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
344 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
345 #, no-wrap
346 msgid "C library/kernel differences"
347 msgstr "Отличия между библиотекой C и ядром"
348
349 #. type: Plain text
350 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
351 #: opensuse-leap-16-1 opensuse-tumbleweed
352 #, fuzzy
353 #| msgid ""
354 #| "The GNU C library does not employ the B<gethostname>() system call; "
355 #| "instead, it implements B<gethostname>() as a library function that calls "
356 #| "B<uname>(2) and copies up to I<len> bytes from the returned I<nodename> "
357 #| "field into I<name>. Having performed the copy, the function then checks "
358 #| "if the length of the I<nodename> was greater than or equal to I<len>, and "
359 #| "if it is, then the function returns -1 with I<errno> set to "
360 #| "B<ENAMETOOLONG>; in this case, a terminating null byte is not included in "
361 #| "the returned I<name>."
362 msgid ""
363 "The GNU C library does not employ the B<gethostname>() system call; "
364 "instead, it implements B<gethostname>() as a library function that calls "
365 "B<uname>(2) and copies up to I<size> bytes from the returned I<nodename> "
366 "field into I<name>. Having performed the copy, the function then checks if "
367 "the length of the I<nodename> was greater than or equal to I<size>, and if "
368 "it is, then the function returns -1 with I<errno> set to B<ENAMETOOLONG>; in "
369 "this case, a terminating null byte is not included in the returned I<name>."
370 msgstr ""
371 "Библиотека GNU C library не использует системный вызов B<gethostname>(); "
372 "вместо этого B<gethostname>() в ней реализован в виде библиотечной функции, "
373 "которая вызывает B<uname>(2) и копирует до I<len> байт в I<name> из "
374 "возвращаемого поля I<nodename>. Выполнив копирование, функция проверяет, что "
375 "длина I<nodename> не больше или равна I<len>, и если это обнаруживается, то "
376 "функция возвращает -1, устанавливая значение I<errno> равным "
377 "B<ENAMETOOLONG>; в этом случае в возвращаемое значение I<name> завершающий "
378 "null не добавляется."
379
380 #. type: SH
381 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
382 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
383 #, no-wrap
384 msgid "STANDARDS"
385 msgstr "СТАНДАРТЫ"
386
387 #. type: TP
388 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
389 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
390 #, fuzzy, no-wrap
391 #| msgid "B<gethostname>():"
392 msgid "B<gethostname>()"
393 msgstr "B<gethostname>():"
394
395 #. type: Plain text
396 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
397 #: opensuse-tumbleweed
398 msgid "POSIX.1-2024."
399 msgstr "POSIX.1-2024."
400
401 #. type: TP
402 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
403 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
404 #, fuzzy, no-wrap
405 #| msgid "B<sethostname>():"
406 msgid "B<sethostname>()"
407 msgstr "B<sethostname>():"
408
409 #. type: Plain text
410 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
411 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
412 msgid "None."
413 msgstr "Отсутствуют."
414
415 #. type: SH
416 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
417 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
418 #, no-wrap
419 msgid "HISTORY"
420 msgstr "ИСТОРИЯ"
421
422 #. type: Plain text
423 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
424 #: opensuse-tumbleweed
425 #, fuzzy
426 #| msgid "4.4BSD, SVr4, POSIX.1-2001."
427 msgid "4.2BSD, SVr4, POSIX.1-2001."
428 msgstr "4.4BSD, SVr4, POSIX.1-2001."
429
430 #. type: Plain text
431 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
432 #: opensuse-tumbleweed
433 #, fuzzy
434 #| msgid "4.4BSD, SVr4, POSIX.1-2001."
435 msgid "4.2BSD, SVr4."
436 msgstr "4.4BSD, SVr4, POSIX.1-2001."
437
438 #. At least glibc 2.0 and glibc 2.1, older versions not checked
439 #. type: Plain text
440 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
441 #: opensuse-leap-16-1 opensuse-tumbleweed
442 #, fuzzy
443 #| msgid ""
444 #| "Versions of glibc before 2.2 handle the case where the length of the "
445 #| "I<nodename> was greater than or equal to I<len> differently: nothing is "
446 #| "copied into I<name> and the function returns -1 with I<errno> set to "
447 #| "B<ENAMETOOLONG>."
448 msgid ""
449 "Versions of glibc before glibc 2.2 handle the case where the length of the "
450 "I<nodename> was greater than or equal to I<size> differently: nothing is "
451 "copied into I<name> and the function returns -1 with I<errno> set to "
452 "B<ENAMETOOLONG>."
453 msgstr ""
454 "Версии glibc до 2.2 обрабатывали случай превышения длины I<nodename> по "
455 "другому: ничего не копировалось в I<name> и функция возвращала -1, "
456 "устанавливая I<errno> равным B<ENAMETOOLONG>."
457
458 #. type: SH
459 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
460 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
461 #, no-wrap
462 msgid "SEE ALSO"
463 msgstr "СМОТРИТЕ ТАКЖЕ"
464
465 #. type: Plain text
466 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
467 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
468 msgid ""
469 "B<hostname>(1), B<getdomainname>(2), B<setdomainname>(2), B<uname>(2), "
470 "B<uts_namespaces>(7)"
471 msgstr ""
472 "B<hostname>(1), B<getdomainname>(2), B<setdomainname>(2), B<uname>(2), "
473 "B<uts_namespaces>(7)"
474
475 #. type: TH
476 #: debian-trixie
477 #, no-wrap
478 msgid "2024-05-02"
479 msgstr "2 мая 2024 г."
480
481 #. type: TH
482 #: debian-trixie
483 #, no-wrap
484 msgid "Linux man-pages 6.9.1"
485 msgstr "Страницы руководства Linux 6.9.1"
486
487 #. type: Plain text
488 #: debian-trixie
489 msgid "Standard C library (I<libc>, I<-lc>)"
490 msgstr "Стандартная библиотека языка C (I<libc>, I<-lc>)"
491
492 #. type: Plain text
493 #: debian-trixie
494 #, no-wrap
495 msgid ""
496 "B<int gethostname(char *>I<name>B<, size_t >I<len>B<);>\n"
497 "B<int sethostname(const char *>I<name>B<, size_t >I<len>B<);>\n"
498 msgstr ""
499 "B<int gethostname(char *>I<name>B<, size_t >I<len>B<);>\n"
500 "B<int sethostname(const char *>I<name>B<, size_t >I<len>B<);>\n"
501
502 #. type: Plain text
503 #: debian-trixie
504 msgid ""
505 "B<sethostname>() sets the hostname to the value given in the character "
506 "array I<name>. The I<len> argument specifies the number of bytes in "
507 "I<name>. (Thus, I<name> does not require a terminating null byte.)"
508 msgstr ""
509 "Вызов B<sethostname>() устанавливает имя узла равны значению, указанному в "
510 "массиве символов I<name>. Аргумент I<len> определяет количество байт в "
511 "I<name>. (Таким образом, I<name> не требует наличия завершающего байта с "
512 "null.)"
513
514 #. type: Plain text
515 #: debian-trixie
516 msgid ""
517 "B<gethostname>() returns the null-terminated hostname in the character "
518 "array I<name>, which has a length of I<len> bytes. If the null-terminated "
519 "hostname is too large to fit, then the name is truncated, and no error is "
520 "returned (but see NOTES below). POSIX.1 says that if such truncation "
521 "occurs, then it is unspecified whether the returned buffer includes a "
522 "terminating null byte."
523 msgstr ""
524 "B<gethostname>() возвращает имя узла с null на конце в массиве символов "
525 "I<name> длиной I<len> байт. Если имя узла, оканчивающееся null, не "
526 "помещается, то имя обрезается и ошибки не происходит (но смотрите ЗАМЕЧАНИЯ "
527 "далее). В POSIX.1 сказано, что если обрезание произошло, то неясно, будет ли "
528 "буфер содержать завершающий байт с null."
529
530 #. Can't occur for gethostbyname() wrapper, since 'len' has an
531 #. unsigned type; can occur for the underlying system call.
532 #. type: Plain text
533 #: debian-trixie
534 msgid ""
535 "I<len> is negative or, for B<sethostname>(), I<len> is larger than the "
536 "maximum allowed size."
537 msgstr ""
538 "I<len> имеет отрицательное значение или для B<sethostname>() длина I<len> "
539 "больше, чем максимально допустимое значение."
540
541 #. type: Plain text
542 #: debian-trixie
543 #, fuzzy
544 #| msgid ""
545 #| "(glibc B<gethostname>()) I<len> is smaller than the actual size. "
546 #| "(Before version 2.1, glibc uses B<EINVAL> for this case.)"
547 msgid ""
548 "(glibc B<gethostname>()) I<len> is smaller than the actual size. (Before "
549 "glibc 2.1, glibc uses B<EINVAL> for this case.)"
550 msgstr ""
551 "(B<gethostname>() из glibc) I<len> меньше чем реальный размер. (До версии "
552 "2.1, glibc возвращала в этом случае B<EINVAL>.)"
553
554 #. type: Plain text
555 #: debian-trixie
556 msgid ""
557 "The GNU C library does not employ the B<gethostname>() system call; "
558 "instead, it implements B<gethostname>() as a library function that calls "
559 "B<uname>(2) and copies up to I<len> bytes from the returned I<nodename> "
560 "field into I<name>. Having performed the copy, the function then checks if "
561 "the length of the I<nodename> was greater than or equal to I<len>, and if it "
562 "is, then the function returns -1 with I<errno> set to B<ENAMETOOLONG>; in "
563 "this case, a terminating null byte is not included in the returned I<name>."
564 msgstr ""
565 "Библиотека GNU C library не использует системный вызов B<gethostname>(); "
566 "вместо этого B<gethostname>() в ней реализован в виде библиотечной функции, "
567 "которая вызывает B<uname>(2) и копирует до I<len> байт в I<name> из "
568 "возвращаемого поля I<nodename>. Выполнив копирование, функция проверяет, что "
569 "длина I<nodename> не больше или равна I<len>, и если это обнаруживается, то "
570 "функция возвращает -1, устанавливая значение I<errno> равным "
571 "B<ENAMETOOLONG>; в этом случае в возвращаемое значение I<name> завершающий "
572 "null не добавляется."
573
574 #. type: Plain text
575 #: debian-trixie fedora-44 fedora-rawhide
576 msgid "POSIX.1-2008."
577 msgstr "POSIX.1-2008."
578
579 #. type: Plain text
580 #: debian-trixie fedora-44 fedora-rawhide
581 msgid ""
582 "SVr4, 4.4BSD (these interfaces first appeared in 4.2BSD). POSIX.1-2001 and "
583 "POSIX.1-2008 specify B<gethostname>() but not B<sethostname>()."
584 msgstr ""
585 "SVr4, 4.4BSD (данная функция впервые появилась в 4.2BSD). В POSIX.1-2001 и "
586 "POSIX.1-2008 определена B<gethostname>(), но нет B<sethostname>()."
587
588 #. At least glibc 2.0 and glibc 2.1, older versions not checked
589 #. type: Plain text
590 #: debian-trixie
591 #, fuzzy
592 #| msgid ""
593 #| "Versions of glibc before 2.2 handle the case where the length of the "
594 #| "I<nodename> was greater than or equal to I<len> differently: nothing is "
595 #| "copied into I<name> and the function returns -1 with I<errno> set to "
596 #| "B<ENAMETOOLONG>."
597 msgid ""
598 "Versions of glibc before glibc 2.2 handle the case where the length of the "
599 "I<nodename> was greater than or equal to I<len> differently: nothing is "
600 "copied into I<name> and the function returns -1 with I<errno> set to "
601 "B<ENAMETOOLONG>."
602 msgstr ""
603 "Версии glibc до 2.2 обрабатывали случай превышения длины I<nodename> по "
604 "другому: ничего не копировалось в I<name> и функция возвращала -1, "
605 "устанавливая I<errno> равным B<ENAMETOOLONG>."
606
607 #. type: TH
608 #: fedora-44 fedora-rawhide
609 #, no-wrap
610 msgid "2024-11-17"
611 msgstr "17 ноября 2024 г."
612
613 #. type: TH
614 #: fedora-44 fedora-rawhide
615 #, no-wrap
616 msgid "Linux man-pages 6.13"
617 msgstr "Страницы руководства Linux 6.13"
618
619 #. type: TH
620 #: mageia-cauldron
621 #, no-wrap
622 msgid "Linux man-pages 6.17"
623 msgstr "Страницы руководства Linux 6.17"
624
625 #. type: TH
626 #: opensuse-leap-16-1 opensuse-tumbleweed
627 #, no-wrap
628 msgid "Linux man-pages (unreleased)"
629 msgstr "Страницы руководства Linux (не выпущены)"