| 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:24+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 "fcntl" |
| 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 "fcntl - manipulate file descriptor" |
| 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>fcntl.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 "B<int fcntl(int >I<fd>B<, int >I<op>B<, ...);>\n" |
| 84 |
msgstr "" |
| 85 |
|
| 86 |
#. type: SH |
| 87 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 88 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 89 |
#, no-wrap |
| 90 |
msgid "DESCRIPTION" |
| 91 |
msgstr "" |
| 92 |
|
| 93 |
#. type: Plain text |
| 94 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 95 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 96 |
msgid "" |
| 97 |
"B<fcntl>() performs one of the operations described below on the open file " |
| 98 |
"descriptor I<fd>. The operation is determined by I<op>." |
| 99 |
msgstr "" |
| 100 |
|
| 101 |
#. type: Plain text |
| 102 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 103 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 104 |
msgid "" |
| 105 |
"Certain of the operations below are supported only since a particular Linux " |
| 106 |
"kernel version. The preferred method of checking whether the host kernel " |
| 107 |
"supports a particular operation is to invoke B<fcntl>() with the desired " |
| 108 |
"I<op> value and then test whether the call failed with B<EINVAL>, indicating " |
| 109 |
"that the kernel does not recognize this value." |
| 110 |
msgstr "" |
| 111 |
|
| 112 |
#. type: SS |
| 113 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 114 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 115 |
#, no-wrap |
| 116 |
msgid "Duplicating a file descriptor" |
| 117 |
msgstr "" |
| 118 |
|
| 119 |
#. type: TP |
| 120 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 121 |
#: opensuse-tumbleweed |
| 122 |
#, no-wrap |
| 123 |
msgid "B<F_DUPFD>(2const)" |
| 124 |
msgstr "" |
| 125 |
|
| 126 |
#. type: TQ |
| 127 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 128 |
#: opensuse-tumbleweed |
| 129 |
#, no-wrap |
| 130 |
msgid "B<F_DUPFD_CLOEXEC>(2const)" |
| 131 |
msgstr "" |
| 132 |
|
| 133 |
#. type: SS |
| 134 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 135 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 136 |
#, no-wrap |
| 137 |
msgid "File descriptor flags" |
| 138 |
msgstr "" |
| 139 |
|
| 140 |
#. type: TP |
| 141 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 142 |
#: opensuse-tumbleweed |
| 143 |
#, no-wrap |
| 144 |
msgid "B<F_GETFD>(2const)" |
| 145 |
msgstr "" |
| 146 |
|
| 147 |
#. type: TQ |
| 148 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 149 |
#: opensuse-tumbleweed |
| 150 |
#, no-wrap |
| 151 |
msgid "B<F_SETFD>(2const)" |
| 152 |
msgstr "" |
| 153 |
|
| 154 |
#. type: SS |
| 155 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 156 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 157 |
#, no-wrap |
| 158 |
msgid "File status flags" |
| 159 |
msgstr "" |
| 160 |
|
| 161 |
#. type: TP |
| 162 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 163 |
#: opensuse-tumbleweed |
| 164 |
#, no-wrap |
| 165 |
msgid "B<F_GETFL>(2const)" |
| 166 |
msgstr "" |
| 167 |
|
| 168 |
#. type: TQ |
| 169 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 170 |
#: opensuse-tumbleweed |
| 171 |
#, no-wrap |
| 172 |
msgid "B<F_SETFL>(2const)" |
| 173 |
msgstr "" |
| 174 |
|
| 175 |
#. type: SS |
| 176 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 177 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 178 |
#, no-wrap |
| 179 |
msgid "Advisory record locking" |
| 180 |
msgstr "" |
| 181 |
|
| 182 |
#. type: TP |
| 183 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 184 |
#: opensuse-tumbleweed |
| 185 |
#, no-wrap |
| 186 |
msgid "B<F_SETLK>(2const)" |
| 187 |
msgstr "" |
| 188 |
|
| 189 |
#. type: TQ |
| 190 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 191 |
#: opensuse-tumbleweed |
| 192 |
#, no-wrap |
| 193 |
msgid "B<F_SETLKW>(2const)" |
| 194 |
msgstr "" |
| 195 |
|
| 196 |
#. type: TQ |
| 197 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 198 |
#: opensuse-tumbleweed |
| 199 |
#, no-wrap |
| 200 |
msgid "B<F_GETLK>(2const)" |
| 201 |
msgstr "" |
| 202 |
|
| 203 |
#. type: SS |
| 204 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 205 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 206 |
#, no-wrap |
| 207 |
msgid "Open file description locks (non-POSIX)" |
| 208 |
msgstr "" |
| 209 |
|
| 210 |
#. type: TP |
| 211 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 212 |
#: opensuse-tumbleweed |
| 213 |
#, no-wrap |
| 214 |
msgid "B<F_OFD_SETLK>(2const)" |
| 215 |
msgstr "" |
| 216 |
|
| 217 |
#. type: TQ |
| 218 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 219 |
#: opensuse-tumbleweed |
| 220 |
#, no-wrap |
| 221 |
msgid "B<F_OFD_SETLKW>(2const)" |
| 222 |
msgstr "" |
| 223 |
|
| 224 |
#. type: TQ |
| 225 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 226 |
#: opensuse-tumbleweed |
| 227 |
#, no-wrap |
| 228 |
msgid "B<F_OFD_GETLK>(2const)" |
| 229 |
msgstr "" |
| 230 |
|
| 231 |
#. type: SS |
| 232 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 233 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 234 |
#, no-wrap |
| 235 |
msgid "Managing signals" |
| 236 |
msgstr "" |
| 237 |
|
| 238 |
#. type: TP |
| 239 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 240 |
#: opensuse-tumbleweed |
| 241 |
#, no-wrap |
| 242 |
msgid "B<F_GETOWN>(2const)" |
| 243 |
msgstr "" |
| 244 |
|
| 245 |
#. type: TQ |
| 246 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 247 |
#: opensuse-tumbleweed |
| 248 |
#, no-wrap |
| 249 |
msgid "B<F_SETOWN>(2const)" |
| 250 |
msgstr "" |
| 251 |
|
| 252 |
#. type: TQ |
| 253 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 254 |
#: opensuse-tumbleweed |
| 255 |
#, no-wrap |
| 256 |
msgid "B<F_GETOWN_EX>(2const)" |
| 257 |
msgstr "" |
| 258 |
|
| 259 |
#. type: TQ |
| 260 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 261 |
#: opensuse-tumbleweed |
| 262 |
#, no-wrap |
| 263 |
msgid "B<F_SETOWN_EX>(2const)" |
| 264 |
msgstr "" |
| 265 |
|
| 266 |
#. type: TQ |
| 267 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 268 |
#: opensuse-tumbleweed |
| 269 |
#, no-wrap |
| 270 |
msgid "B<F_GETSIG>(2const)" |
| 271 |
msgstr "" |
| 272 |
|
| 273 |
#. type: TQ |
| 274 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 275 |
#: opensuse-tumbleweed |
| 276 |
#, no-wrap |
| 277 |
msgid "B<F_SETSIG>(2const)" |
| 278 |
msgstr "" |
| 279 |
|
| 280 |
#. type: SS |
| 281 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 282 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 283 |
#, no-wrap |
| 284 |
msgid "Leases" |
| 285 |
msgstr "" |
| 286 |
|
| 287 |
#. type: TP |
| 288 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 289 |
#: opensuse-tumbleweed |
| 290 |
#, no-wrap |
| 291 |
msgid "B<F_SETLEASE>(2const)" |
| 292 |
msgstr "" |
| 293 |
|
| 294 |
#. type: TQ |
| 295 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 296 |
#: opensuse-tumbleweed |
| 297 |
#, no-wrap |
| 298 |
msgid "B<F_GETLEASE>(2const)" |
| 299 |
msgstr "" |
| 300 |
|
| 301 |
#. type: SS |
| 302 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 303 |
#: opensuse-tumbleweed |
| 304 |
#, no-wrap |
| 305 |
msgid "Delegations" |
| 306 |
msgstr "" |
| 307 |
|
| 308 |
#. type: TP |
| 309 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 310 |
#: opensuse-tumbleweed |
| 311 |
#, no-wrap |
| 312 |
msgid "B<F_SETDELEG>(2const)" |
| 313 |
msgstr "" |
| 314 |
|
| 315 |
#. type: TQ |
| 316 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 317 |
#: opensuse-tumbleweed |
| 318 |
#, no-wrap |
| 319 |
msgid "B<F_GETDELEG>(2const)" |
| 320 |
msgstr "" |
| 321 |
|
| 322 |
#. type: SS |
| 323 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 324 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 325 |
#, no-wrap |
| 326 |
msgid "File and directory change notification (dnotify)" |
| 327 |
msgstr "" |
| 328 |
|
| 329 |
#. type: TP |
| 330 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 331 |
#: opensuse-tumbleweed |
| 332 |
#, no-wrap |
| 333 |
msgid "B<F_NOTIFY>(2const)" |
| 334 |
msgstr "" |
| 335 |
|
| 336 |
#. type: SS |
| 337 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 338 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 339 |
#, no-wrap |
| 340 |
msgid "Changing the capacity of a pipe" |
| 341 |
msgstr "" |
| 342 |
|
| 343 |
#. type: TP |
| 344 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 345 |
#: opensuse-tumbleweed |
| 346 |
#, no-wrap |
| 347 |
msgid "B<F_SETPIPE_SZ>(2const)" |
| 348 |
msgstr "" |
| 349 |
|
| 350 |
#. type: TQ |
| 351 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 352 |
#: opensuse-tumbleweed |
| 353 |
#, no-wrap |
| 354 |
msgid "B<F_GETPIPE_SZ>(2const)" |
| 355 |
msgstr "" |
| 356 |
|
| 357 |
#. type: SS |
| 358 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 359 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 360 |
#, no-wrap |
| 361 |
msgid "File Sealing" |
| 362 |
msgstr "" |
| 363 |
|
| 364 |
#. type: TP |
| 365 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 366 |
#: opensuse-tumbleweed |
| 367 |
#, no-wrap |
| 368 |
msgid "B<F_ADD_SEALS>(2const)" |
| 369 |
msgstr "" |
| 370 |
|
| 371 |
#. type: TQ |
| 372 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 373 |
#: opensuse-tumbleweed |
| 374 |
#, no-wrap |
| 375 |
msgid "B<F_GET_SEALS>(2const)" |
| 376 |
msgstr "" |
| 377 |
|
| 378 |
#. type: SS |
| 379 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 380 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 381 |
#, no-wrap |
| 382 |
msgid "File read/write hints" |
| 383 |
msgstr "" |
| 384 |
|
| 385 |
#. type: TP |
| 386 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 387 |
#: opensuse-tumbleweed |
| 388 |
#, no-wrap |
| 389 |
msgid "B<F_GET_RW_HINT>(2const)" |
| 390 |
msgstr "" |
| 391 |
|
| 392 |
#. type: TQ |
| 393 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 394 |
#: opensuse-tumbleweed |
| 395 |
#, no-wrap |
| 396 |
msgid "B<F_SET_RW_HINT>(2const)" |
| 397 |
msgstr "" |
| 398 |
|
| 399 |
#. type: TQ |
| 400 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 401 |
#: opensuse-tumbleweed |
| 402 |
#, no-wrap |
| 403 |
msgid "B<F_GET_FILE_RW_HINT>(2const)" |
| 404 |
msgstr "" |
| 405 |
|
| 406 |
#. type: TQ |
| 407 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 408 |
#: opensuse-tumbleweed |
| 409 |
#, no-wrap |
| 410 |
msgid "B<F_SET_FILE_RW_HINT>(2const)" |
| 411 |
msgstr "" |
| 412 |
|
| 413 |
#. type: SH |
| 414 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 415 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 416 |
#, no-wrap |
| 417 |
msgid "RETURN VALUE" |
| 418 |
msgstr "" |
| 419 |
|
| 420 |
#. type: Plain text |
| 421 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 422 |
#: opensuse-tumbleweed |
| 423 |
msgid "For a successful call, the return value depends on the operation." |
| 424 |
msgstr "" |
| 425 |
|
| 426 |
#. type: Plain text |
| 427 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 428 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 429 |
msgid "On error, -1 is returned, and I<errno> is set to indicate the error." |
| 430 |
msgstr "" |
| 431 |
|
| 432 |
#. type: SH |
| 433 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 434 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 435 |
#, no-wrap |
| 436 |
msgid "ERRORS" |
| 437 |
msgstr "" |
| 438 |
|
| 439 |
#. type: TP |
| 440 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 441 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 442 |
#, no-wrap |
| 443 |
msgid "B<EACCES> or B<EAGAIN>" |
| 444 |
msgstr "" |
| 445 |
|
| 446 |
#. type: Plain text |
| 447 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 448 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 449 |
msgid "Operation is prohibited by locks held by other processes." |
| 450 |
msgstr "" |
| 451 |
|
| 452 |
#. type: TP |
| 453 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 454 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 455 |
#, no-wrap |
| 456 |
msgid "B<EAGAIN>" |
| 457 |
msgstr "" |
| 458 |
|
| 459 |
#. type: Plain text |
| 460 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 461 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 462 |
msgid "" |
| 463 |
"The operation is prohibited because the file has been memory-mapped by " |
| 464 |
"another process." |
| 465 |
msgstr "" |
| 466 |
|
| 467 |
#. type: TP |
| 468 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 469 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 470 |
#, no-wrap |
| 471 |
msgid "B<EBADF>" |
| 472 |
msgstr "" |
| 473 |
|
| 474 |
#. type: Plain text |
| 475 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 476 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 477 |
msgid "I<fd> is not an open file descriptor" |
| 478 |
msgstr "" |
| 479 |
|
| 480 |
#. type: TP |
| 481 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 482 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 483 |
#, no-wrap |
| 484 |
msgid "B<EINVAL>" |
| 485 |
msgstr "" |
| 486 |
|
| 487 |
#. type: Plain text |
| 488 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 489 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 490 |
msgid "The value specified in I<op> is not recognized by this kernel." |
| 491 |
msgstr "" |
| 492 |
|
| 493 |
#. type: SH |
| 494 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 495 |
#: opensuse-tumbleweed |
| 496 |
#, no-wrap |
| 497 |
msgid "VERSIONS" |
| 498 |
msgstr "" |
| 499 |
|
| 500 |
#. type: Plain text |
| 501 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 502 |
#: opensuse-tumbleweed |
| 503 |
msgid "" |
| 504 |
"POSIX.1-2024 specifies B<FD_CLOFORK> and B<F_DUPFD_CLOFORK>, but Linux " |
| 505 |
"doesn't support them." |
| 506 |
msgstr "" |
| 507 |
|
| 508 |
#. type: SH |
| 509 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 510 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 511 |
#, no-wrap |
| 512 |
msgid "STANDARDS" |
| 513 |
msgstr "" |
| 514 |
|
| 515 |
#. .P |
| 516 |
#. SVr4 documents additional EIO, ENOLINK and EOVERFLOW error conditions. |
| 517 |
#. type: Plain text |
| 518 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 519 |
#: opensuse-tumbleweed |
| 520 |
msgid "POSIX.1-2024." |
| 521 |
msgstr "" |
| 522 |
|
| 523 |
#. type: SH |
| 524 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 525 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 526 |
#, no-wrap |
| 527 |
msgid "HISTORY" |
| 528 |
msgstr "" |
| 529 |
|
| 530 |
#. type: Plain text |
| 531 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 532 |
#: opensuse-tumbleweed |
| 533 |
msgid "4.3BSD, SVr4, POSIX.1-1988." |
| 534 |
msgstr "" |
| 535 |
|
| 536 |
#. type: SH |
| 537 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 538 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 539 |
#, no-wrap |
| 540 |
msgid "SEE ALSO" |
| 541 |
msgstr "" |
| 542 |
|
| 543 |
#. type: Plain text |
| 544 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 545 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 546 |
msgid "" |
| 547 |
"B<dup2>(2), B<flock>(2), B<open>(2), B<socket>(2), B<lockf>(3), " |
| 548 |
"B<capabilities>(7), B<feature_test_macros>(7), B<lslocks>(8)" |
| 549 |
msgstr "" |
| 550 |
|
| 551 |
#. type: TH |
| 552 |
#: debian-trixie |
| 553 |
#, no-wrap |
| 554 |
msgid "2024-05-02" |
| 555 |
msgstr "" |
| 556 |
|
| 557 |
#. type: TH |
| 558 |
#: debian-trixie |
| 559 |
#, no-wrap |
| 560 |
msgid "Linux man-pages 6.9.1" |
| 561 |
msgstr "" |
| 562 |
|
| 563 |
#. type: Plain text |
| 564 |
#: debian-trixie |
| 565 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 566 |
msgstr "" |
| 567 |
|
| 568 |
#. type: Plain text |
| 569 |
#: debian-trixie fedora-44 fedora-rawhide |
| 570 |
#, no-wrap |
| 571 |
msgid "B<int fcntl(int >I<fd>B<, int >I<op>B<, ... /* >I<arg>B< */ );>\n" |
| 572 |
msgstr "" |
| 573 |
|
| 574 |
#. type: Plain text |
| 575 |
#: debian-trixie fedora-44 fedora-rawhide |
| 576 |
msgid "" |
| 577 |
"B<fcntl>() can take an optional third argument. Whether or not this " |
| 578 |
"argument is required is determined by I<op>. The required argument type is " |
| 579 |
"indicated in parentheses after each I<op> name (in most cases, the required " |
| 580 |
"type is I<int>, and we identify the argument using the name I<arg>), or " |
| 581 |
"I<void> is specified if the argument is not required." |
| 582 |
msgstr "" |
| 583 |
|
| 584 |
#. type: TP |
| 585 |
#: debian-trixie fedora-44 fedora-rawhide |
| 586 |
#, no-wrap |
| 587 |
msgid "B<F_DUPFD> (I<int>)" |
| 588 |
msgstr "" |
| 589 |
|
| 590 |
#. type: Plain text |
| 591 |
#: debian-trixie fedora-44 fedora-rawhide |
| 592 |
msgid "" |
| 593 |
"Duplicate the file descriptor I<fd> using the lowest-numbered available file " |
| 594 |
"descriptor greater than or equal to I<arg>. This is different from " |
| 595 |
"B<dup2>(2), which uses exactly the file descriptor specified." |
| 596 |
msgstr "" |
| 597 |
|
| 598 |
#. type: Plain text |
| 599 |
#: debian-trixie fedora-44 fedora-rawhide |
| 600 |
msgid "On success, the new file descriptor is returned." |
| 601 |
msgstr "" |
| 602 |
|
| 603 |
#. type: Plain text |
| 604 |
#: debian-trixie fedora-44 fedora-rawhide |
| 605 |
msgid "See B<dup>(2) for further details." |
| 606 |
msgstr "" |
| 607 |
|
| 608 |
#. type: TP |
| 609 |
#: debian-trixie fedora-44 fedora-rawhide |
| 610 |
#, no-wrap |
| 611 |
msgid "B<F_DUPFD_CLOEXEC> (I<int>; since Linux 2.6.24)" |
| 612 |
msgstr "" |
| 613 |
|
| 614 |
#. type: Plain text |
| 615 |
#: debian-trixie fedora-44 fedora-rawhide |
| 616 |
msgid "" |
| 617 |
"As for B<F_DUPFD>, but additionally set the close-on-exec flag for the " |
| 618 |
"duplicate file descriptor. Specifying this flag permits a program to avoid " |
| 619 |
"an additional B<fcntl>() B<F_SETFD> operation to set the B<FD_CLOEXEC> " |
| 620 |
"flag. For an explanation of why this flag is useful, see the description of " |
| 621 |
"B<O_CLOEXEC> in B<open>(2)." |
| 622 |
msgstr "" |
| 623 |
|
| 624 |
#. type: Plain text |
| 625 |
#: debian-trixie fedora-44 fedora-rawhide |
| 626 |
msgid "" |
| 627 |
"The following operations manipulate the flags associated with a file " |
| 628 |
"descriptor. Currently, only one such flag is defined: B<FD_CLOEXEC>, the " |
| 629 |
"close-on-exec flag. If the B<FD_CLOEXEC> bit is set, the file descriptor " |
| 630 |
"will automatically be closed during a successful B<execve>(2). (If the " |
| 631 |
"B<execve>(2) fails, the file descriptor is left open.) If the " |
| 632 |
"B<FD_CLOEXEC> bit is not set, the file descriptor will remain open across an " |
| 633 |
"B<execve>(2)." |
| 634 |
msgstr "" |
| 635 |
|
| 636 |
#. type: TP |
| 637 |
#: debian-trixie fedora-44 fedora-rawhide |
| 638 |
#, no-wrap |
| 639 |
msgid "B<F_GETFD> (I<void>)" |
| 640 |
msgstr "" |
| 641 |
|
| 642 |
#. type: Plain text |
| 643 |
#: debian-trixie fedora-44 fedora-rawhide |
| 644 |
msgid "" |
| 645 |
"Return (as the function result) the file descriptor flags; I<arg> is ignored." |
| 646 |
msgstr "" |
| 647 |
|
| 648 |
#. type: TP |
| 649 |
#: debian-trixie fedora-44 fedora-rawhide |
| 650 |
#, no-wrap |
| 651 |
msgid "B<F_SETFD> (I<int>)" |
| 652 |
msgstr "" |
| 653 |
|
| 654 |
#. type: Plain text |
| 655 |
#: debian-trixie fedora-44 fedora-rawhide |
| 656 |
msgid "Set the file descriptor flags to the value specified by I<arg>." |
| 657 |
msgstr "" |
| 658 |
|
| 659 |
#. type: Plain text |
| 660 |
#: debian-trixie fedora-44 fedora-rawhide |
| 661 |
msgid "" |
| 662 |
"In multithreaded programs, using B<fcntl>() B<F_SETFD> to set the close-on-" |
| 663 |
"exec flag at the same time as another thread performs a B<fork>(2) plus " |
| 664 |
"B<execve>(2) is vulnerable to a race condition that may unintentionally " |
| 665 |
"leak the file descriptor to the program executed in the child process. See " |
| 666 |
"the discussion of the B<O_CLOEXEC> flag in B<open>(2) for details and a " |
| 667 |
"remedy to the problem." |
| 668 |
msgstr "" |
| 669 |
|
| 670 |
#. or |
| 671 |
#. .BR creat (2), |
| 672 |
#. type: Plain text |
| 673 |
#: debian-trixie fedora-44 fedora-rawhide |
| 674 |
msgid "" |
| 675 |
"Each open file description has certain associated status flags, initialized " |
| 676 |
"by B<open>(2) and possibly modified by B<fcntl>(). Duplicated file " |
| 677 |
"descriptors (made with B<dup>(2), B<fcntl>(F_DUPFD), B<fork>(2), etc.) refer " |
| 678 |
"to the same open file description, and thus share the same file status flags." |
| 679 |
msgstr "" |
| 680 |
|
| 681 |
#. type: Plain text |
| 682 |
#: debian-trixie fedora-44 fedora-rawhide |
| 683 |
msgid "The file status flags and their semantics are described in B<open>(2)." |
| 684 |
msgstr "" |
| 685 |
|
| 686 |
#. type: TP |
| 687 |
#: debian-trixie fedora-44 fedora-rawhide |
| 688 |
#, no-wrap |
| 689 |
msgid "B<F_GETFL> (I<void>)" |
| 690 |
msgstr "" |
| 691 |
|
| 692 |
#. type: Plain text |
| 693 |
#: debian-trixie fedora-44 fedora-rawhide |
| 694 |
msgid "" |
| 695 |
"Return (as the function result) the file access mode and the file status " |
| 696 |
"flags; I<arg> is ignored." |
| 697 |
msgstr "" |
| 698 |
|
| 699 |
#. type: TP |
| 700 |
#: debian-trixie fedora-44 fedora-rawhide |
| 701 |
#, no-wrap |
| 702 |
msgid "B<F_SETFL> (I<int>)" |
| 703 |
msgstr "" |
| 704 |
|
| 705 |
#. type: Plain text |
| 706 |
#: debian-trixie fedora-44 fedora-rawhide |
| 707 |
msgid "" |
| 708 |
"Set the file status flags to the value specified by I<arg>. File access " |
| 709 |
"mode (B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR>) and file creation flags (i.e., " |
| 710 |
"B<O_CREAT>, B<O_EXCL>, B<O_NOCTTY>, B<O_TRUNC>) in I<arg> are ignored. On " |
| 711 |
"Linux, this operation can change only the B<O_APPEND>, B<O_ASYNC>, " |
| 712 |
"B<O_DIRECT>, B<O_NOATIME>, and B<O_NONBLOCK> flags. It is not possible to " |
| 713 |
"change the B<O_DSYNC> and B<O_SYNC> flags; see BUGS, below." |
| 714 |
msgstr "" |
| 715 |
|
| 716 |
#. type: Plain text |
| 717 |
#: debian-trixie fedora-44 fedora-rawhide |
| 718 |
msgid "" |
| 719 |
"Linux implements traditional (\"process-associated\") UNIX record locks, as " |
| 720 |
"standardized by POSIX. For a Linux-specific alternative with better " |
| 721 |
"semantics, see the discussion of open file description locks below." |
| 722 |
msgstr "" |
| 723 |
|
| 724 |
#. type: Plain text |
| 725 |
#: debian-trixie fedora-44 fedora-rawhide |
| 726 |
msgid "" |
| 727 |
"B<F_SETLK>, B<F_SETLKW>, and B<F_GETLK> are used to acquire, release, and " |
| 728 |
"test for the existence of record locks (also known as byte-range, file-" |
| 729 |
"segment, or file-region locks). The third argument, I<lock>, is a pointer " |
| 730 |
"to a structure that has at least the following fields (in unspecified order)." |
| 731 |
msgstr "" |
| 732 |
|
| 733 |
#. type: Plain text |
| 734 |
#: debian-trixie fedora-44 fedora-rawhide |
| 735 |
#, no-wrap |
| 736 |
msgid "" |
| 737 |
"struct flock {\n" |
| 738 |
" ...\n" |
| 739 |
" short l_type; /* Type of lock: F_RDLCK,\n" |
| 740 |
" F_WRLCK, F_UNLCK */\n" |
| 741 |
" short l_whence; /* How to interpret l_start:\n" |
| 742 |
" SEEK_SET, SEEK_CUR, SEEK_END */\n" |
| 743 |
" off_t l_start; /* Starting offset for lock */\n" |
| 744 |
" off_t l_len; /* Number of bytes to lock */\n" |
| 745 |
" pid_t l_pid; /* PID of process blocking our lock\n" |
| 746 |
" (set by F_GETLK and F_OFD_GETLK) */\n" |
| 747 |
" ...\n" |
| 748 |
"};\n" |
| 749 |
msgstr "" |
| 750 |
|
| 751 |
#. type: Plain text |
| 752 |
#: debian-trixie fedora-44 fedora-rawhide |
| 753 |
msgid "" |
| 754 |
"The I<l_whence>, I<l_start>, and I<l_len> fields of this structure specify " |
| 755 |
"the range of bytes we wish to lock. Bytes past the end of the file may be " |
| 756 |
"locked, but not bytes before the start of the file." |
| 757 |
msgstr "" |
| 758 |
|
| 759 |
#. type: Plain text |
| 760 |
#: debian-trixie fedora-44 fedora-rawhide |
| 761 |
msgid "" |
| 762 |
"I<l_start> is the starting offset for the lock, and is interpreted relative " |
| 763 |
"to either: the start of the file (if I<l_whence> is B<SEEK_SET>); the " |
| 764 |
"current file offset (if I<l_whence> is B<SEEK_CUR>); or the end of the file " |
| 765 |
"(if I<l_whence> is B<SEEK_END>). In the final two cases, I<l_start> can be " |
| 766 |
"a negative number provided the offset does not lie before the start of the " |
| 767 |
"file." |
| 768 |
msgstr "" |
| 769 |
|
| 770 |
#. type: Plain text |
| 771 |
#: debian-trixie fedora-44 fedora-rawhide |
| 772 |
msgid "" |
| 773 |
"I<l_len> specifies the number of bytes to be locked. If I<l_len> is " |
| 774 |
"positive, then the range to be locked covers bytes I<l_start> up to and " |
| 775 |
"including I<l_start>+I<l_len>-1. Specifying 0 for I<l_len> has the special " |
| 776 |
"meaning: lock all bytes starting at the location specified by I<l_whence> " |
| 777 |
"and I<l_start> through to the end of file, no matter how large the file " |
| 778 |
"grows." |
| 779 |
msgstr "" |
| 780 |
|
| 781 |
#. type: Plain text |
| 782 |
#: debian-trixie fedora-44 fedora-rawhide |
| 783 |
msgid "" |
| 784 |
"POSIX.1-2001 allows (but does not require) an implementation to support a " |
| 785 |
"negative I<l_len> value; if I<l_len> is negative, the interval described by " |
| 786 |
"I<lock> covers bytes I<l_start>+I<l_len> up to and including I<l_start>-1. " |
| 787 |
"This is supported since Linux 2.4.21 and Linux 2.5.49." |
| 788 |
msgstr "" |
| 789 |
|
| 790 |
#. type: Plain text |
| 791 |
#: debian-trixie fedora-44 fedora-rawhide |
| 792 |
msgid "" |
| 793 |
"The I<l_type> field can be used to place a read (B<F_RDLCK>) or a write " |
| 794 |
"(B<F_WRLCK>) lock on a file. Any number of processes may hold a read lock " |
| 795 |
"(shared lock) on a file region, but only one process may hold a write lock " |
| 796 |
"(exclusive lock). An exclusive lock excludes all other locks, both shared " |
| 797 |
"and exclusive. A single process can hold only one type of lock on a file " |
| 798 |
"region; if a new lock is applied to an already-locked region, then the " |
| 799 |
"existing lock is converted to the new lock type. (Such conversions may " |
| 800 |
"involve splitting, shrinking, or coalescing with an existing lock if the " |
| 801 |
"byte range specified by the new lock does not precisely coincide with the " |
| 802 |
"range of the existing lock.)" |
| 803 |
msgstr "" |
| 804 |
|
| 805 |
#. type: TP |
| 806 |
#: debian-trixie fedora-44 fedora-rawhide |
| 807 |
#, no-wrap |
| 808 |
msgid "B<F_SETLK> (I<struct flock *>)" |
| 809 |
msgstr "" |
| 810 |
|
| 811 |
#. type: Plain text |
| 812 |
#: debian-trixie fedora-44 fedora-rawhide |
| 813 |
msgid "" |
| 814 |
"Acquire a lock (when I<l_type> is B<F_RDLCK> or B<F_WRLCK>) or release a " |
| 815 |
"lock (when I<l_type> is B<F_UNLCK>) on the bytes specified by the " |
| 816 |
"I<l_whence>, I<l_start>, and I<l_len> fields of I<lock>. If a conflicting " |
| 817 |
"lock is held by another process, this call returns -1 and sets I<errno> to " |
| 818 |
"B<EACCES> or B<EAGAIN>. (The error returned in this case differs across " |
| 819 |
"implementations, so POSIX requires a portable application to check for both " |
| 820 |
"errors.)" |
| 821 |
msgstr "" |
| 822 |
|
| 823 |
#. type: TP |
| 824 |
#: debian-trixie fedora-44 fedora-rawhide |
| 825 |
#, no-wrap |
| 826 |
msgid "B<F_SETLKW> (I<struct flock *>)" |
| 827 |
msgstr "" |
| 828 |
|
| 829 |
#. type: Plain text |
| 830 |
#: debian-trixie fedora-44 fedora-rawhide |
| 831 |
msgid "" |
| 832 |
"As for B<F_SETLK>, but if a conflicting lock is held on the file, then wait " |
| 833 |
"for that lock to be released. If a signal is caught while waiting, then the " |
| 834 |
"call is interrupted and (after the signal handler has returned) returns " |
| 835 |
"immediately (with return value -1 and I<errno> set to B<EINTR>; see " |
| 836 |
"B<signal>(7))." |
| 837 |
msgstr "" |
| 838 |
|
| 839 |
#. type: TP |
| 840 |
#: debian-trixie fedora-44 fedora-rawhide |
| 841 |
#, no-wrap |
| 842 |
msgid "B<F_GETLK> (I<struct flock *>)" |
| 843 |
msgstr "" |
| 844 |
|
| 845 |
#. type: Plain text |
| 846 |
#: debian-trixie fedora-44 fedora-rawhide |
| 847 |
msgid "" |
| 848 |
"On input to this call, I<lock> describes a lock we would like to place on " |
| 849 |
"the file. If the lock could be placed, B<fcntl>() does not actually place " |
| 850 |
"it, but returns B<F_UNLCK> in the I<l_type> field of I<lock> and leaves the " |
| 851 |
"other fields of the structure unchanged." |
| 852 |
msgstr "" |
| 853 |
|
| 854 |
#. type: Plain text |
| 855 |
#: debian-trixie fedora-44 fedora-rawhide |
| 856 |
msgid "" |
| 857 |
"If one or more incompatible locks would prevent this lock being placed, then " |
| 858 |
"B<fcntl>() returns details about one of those locks in the I<l_type>, " |
| 859 |
"I<l_whence>, I<l_start>, and I<l_len> fields of I<lock>. If the conflicting " |
| 860 |
"lock is a traditional (process-associated) record lock, then the I<l_pid> " |
| 861 |
"field is set to the PID of the process holding that lock. If the " |
| 862 |
"conflicting lock is an open file description lock, then I<l_pid> is set to " |
| 863 |
"-1. Note that the returned information may already be out of date by the " |
| 864 |
"time the caller inspects it." |
| 865 |
msgstr "" |
| 866 |
|
| 867 |
#. type: Plain text |
| 868 |
#: debian-trixie fedora-44 fedora-rawhide |
| 869 |
msgid "" |
| 870 |
"In order to place a read lock, I<fd> must be open for reading. In order to " |
| 871 |
"place a write lock, I<fd> must be open for writing. To place both types of " |
| 872 |
"lock, open a file read-write." |
| 873 |
msgstr "" |
| 874 |
|
| 875 |
#. type: Plain text |
| 876 |
#: debian-trixie fedora-44 fedora-rawhide |
| 877 |
msgid "" |
| 878 |
"When placing locks with B<F_SETLKW>, the kernel detects I<deadlocks>, " |
| 879 |
"whereby two or more processes have their lock requests mutually blocked by " |
| 880 |
"locks held by the other processes. For example, suppose process A holds a " |
| 881 |
"write lock on byte 100 of a file, and process B holds a write lock on byte " |
| 882 |
"200. If each process then attempts to lock the byte already locked by the " |
| 883 |
"other process using B<F_SETLKW>, then, without deadlock detection, both " |
| 884 |
"processes would remain blocked indefinitely. When the kernel detects such " |
| 885 |
"deadlocks, it causes one of the blocking lock requests to immediately fail " |
| 886 |
"with the error B<EDEADLK>; an application that encounters such an error " |
| 887 |
"should release some of its locks to allow other applications to proceed " |
| 888 |
"before attempting regain the locks that it requires. Circular deadlocks " |
| 889 |
"involving more than two processes are also detected. Note, however, that " |
| 890 |
"there are limitations to the kernel's deadlock-detection algorithm; see BUGS." |
| 891 |
msgstr "" |
| 892 |
|
| 893 |
#. type: Plain text |
| 894 |
#: debian-trixie fedora-44 fedora-rawhide |
| 895 |
msgid "" |
| 896 |
"As well as being removed by an explicit B<F_UNLCK>, record locks are " |
| 897 |
"automatically released when the process terminates." |
| 898 |
msgstr "" |
| 899 |
|
| 900 |
#. type: Plain text |
| 901 |
#: debian-trixie fedora-44 fedora-rawhide |
| 902 |
msgid "" |
| 903 |
"Record locks are not inherited by a child created via B<fork>(2), but are " |
| 904 |
"preserved across an B<execve>(2)." |
| 905 |
msgstr "" |
| 906 |
|
| 907 |
#. type: Plain text |
| 908 |
#: debian-trixie fedora-44 fedora-rawhide |
| 909 |
msgid "" |
| 910 |
"Because of the buffering performed by the B<stdio>(3) library, the use of " |
| 911 |
"record locking with routines in that package should be avoided; use " |
| 912 |
"B<read>(2) and B<write>(2) instead." |
| 913 |
msgstr "" |
| 914 |
|
| 915 |
#. type: Plain text |
| 916 |
#: debian-trixie fedora-44 fedora-rawhide |
| 917 |
msgid "" |
| 918 |
"The record locks described above are associated with the process (unlike the " |
| 919 |
"open file description locks described below). This has some unfortunate " |
| 920 |
"consequences:" |
| 921 |
msgstr "" |
| 922 |
|
| 923 |
#. type: IP |
| 924 |
#: debian-trixie fedora-44 fedora-rawhide |
| 925 |
#, no-wrap |
| 926 |
msgid "\\[bu]" |
| 927 |
msgstr "" |
| 928 |
|
| 929 |
#. (Additional file descriptors referring to the same file |
| 930 |
#. may have been obtained by calls to |
| 931 |
#. .BR open "(2), " dup "(2), " dup2 "(2), or " fcntl ().) |
| 932 |
#. type: Plain text |
| 933 |
#: debian-trixie fedora-44 fedora-rawhide |
| 934 |
msgid "" |
| 935 |
"If a process closes I<any> file descriptor referring to a file, then all of " |
| 936 |
"the process's locks on that file are released, regardless of the file " |
| 937 |
"descriptor(s) on which the locks were obtained. This is bad: it means that " |
| 938 |
"a process can lose its locks on a file such as I</etc/passwd> or I</etc/" |
| 939 |
"mtab> when for some reason a library function decides to open, read, and " |
| 940 |
"close the same file." |
| 941 |
msgstr "" |
| 942 |
|
| 943 |
#. type: Plain text |
| 944 |
#: debian-trixie fedora-44 fedora-rawhide |
| 945 |
msgid "" |
| 946 |
"The threads in a process share locks. In other words, a multithreaded " |
| 947 |
"program can't use record locking to ensure that threads don't simultaneously " |
| 948 |
"access the same region of a file." |
| 949 |
msgstr "" |
| 950 |
|
| 951 |
#. type: Plain text |
| 952 |
#: debian-trixie fedora-44 fedora-rawhide |
| 953 |
msgid "Open file description locks solve both of these problems." |
| 954 |
msgstr "" |
| 955 |
|
| 956 |
#. FIXME . Review progress into POSIX |
| 957 |
#. http://austingroupbugs.net/view.php?id=768 |
| 958 |
#. type: Plain text |
| 959 |
#: debian-trixie fedora-44 fedora-rawhide |
| 960 |
msgid "" |
| 961 |
"Open file description locks are advisory byte-range locks whose operation is " |
| 962 |
"in most respects identical to the traditional record locks described above. " |
| 963 |
"This lock type is Linux-specific, and available since Linux 3.15. (There is " |
| 964 |
"a proposal with the Austin Group to include this lock type in the next " |
| 965 |
"revision of POSIX.1.) For an explanation of open file descriptions, see " |
| 966 |
"B<open>(2)." |
| 967 |
msgstr "" |
| 968 |
|
| 969 |
#. type: Plain text |
| 970 |
#: debian-trixie fedora-44 fedora-rawhide |
| 971 |
msgid "" |
| 972 |
"The principal difference between the two lock types is that whereas " |
| 973 |
"traditional record locks are associated with a process, open file " |
| 974 |
"description locks are associated with the open file description on which " |
| 975 |
"they are acquired, much like locks acquired with B<flock>(2). Consequently " |
| 976 |
"(and unlike traditional advisory record locks), open file description locks " |
| 977 |
"are inherited across B<fork>(2) (and B<clone>(2) with B<CLONE_FILES>), and " |
| 978 |
"are only automatically released on the last close of the open file " |
| 979 |
"description, instead of being released on any close of the file." |
| 980 |
msgstr "" |
| 981 |
|
| 982 |
#. type: Plain text |
| 983 |
#: debian-trixie fedora-44 fedora-rawhide |
| 984 |
msgid "" |
| 985 |
"Conflicting lock combinations (i.e., a read lock and a write lock or two " |
| 986 |
"write locks) where one lock is an open file description lock and the other " |
| 987 |
"is a traditional record lock conflict even when they are acquired by the " |
| 988 |
"same process on the same file descriptor." |
| 989 |
msgstr "" |
| 990 |
|
| 991 |
#. type: Plain text |
| 992 |
#: debian-trixie fedora-44 fedora-rawhide |
| 993 |
msgid "" |
| 994 |
"Open file description locks placed via the same open file description (i.e., " |
| 995 |
"via the same file descriptor, or via a duplicate of the file descriptor " |
| 996 |
"created by B<fork>(2), B<dup>(2), B<fcntl>() B<F_DUPFD>, and so on) are " |
| 997 |
"always compatible: if a new lock is placed on an already locked region, then " |
| 998 |
"the existing lock is converted to the new lock type. (Such conversions may " |
| 999 |
"result in splitting, shrinking, or coalescing with an existing lock as " |
| 1000 |
"discussed above.)" |
| 1001 |
msgstr "" |
| 1002 |
|
| 1003 |
#. type: Plain text |
| 1004 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1005 |
msgid "" |
| 1006 |
"On the other hand, open file description locks may conflict with each other " |
| 1007 |
"when they are acquired via different open file descriptions. Thus, the " |
| 1008 |
"threads in a multithreaded program can use open file description locks to " |
| 1009 |
"synchronize access to a file region by having each thread perform its own " |
| 1010 |
"B<open>(2) on the file and applying locks via the resulting file descriptor." |
| 1011 |
msgstr "" |
| 1012 |
|
| 1013 |
#. type: Plain text |
| 1014 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1015 |
msgid "" |
| 1016 |
"As with traditional advisory locks, the third argument to B<fcntl>(), " |
| 1017 |
"I<lock>, is a pointer to an I<flock> structure. By contrast with " |
| 1018 |
"traditional record locks, the I<l_pid> field of that structure must be set " |
| 1019 |
"to zero when using the operations described below." |
| 1020 |
msgstr "" |
| 1021 |
|
| 1022 |
#. type: Plain text |
| 1023 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1024 |
msgid "" |
| 1025 |
"The operations for working with open file description locks are analogous to " |
| 1026 |
"those used with traditional locks:" |
| 1027 |
msgstr "" |
| 1028 |
|
| 1029 |
#. type: TP |
| 1030 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1031 |
#, no-wrap |
| 1032 |
msgid "B<F_OFD_SETLK> (I<struct flock *>)" |
| 1033 |
msgstr "" |
| 1034 |
|
| 1035 |
#. type: Plain text |
| 1036 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1037 |
msgid "" |
| 1038 |
"Acquire an open file description lock (when I<l_type> is B<F_RDLCK> or " |
| 1039 |
"B<F_WRLCK>) or release an open file description lock (when I<l_type> is " |
| 1040 |
"B<F_UNLCK>) on the bytes specified by the I<l_whence>, I<l_start>, and " |
| 1041 |
"I<l_len> fields of I<lock>. If a conflicting lock is held by another " |
| 1042 |
"process, this call returns -1 and sets I<errno> to B<EAGAIN>." |
| 1043 |
msgstr "" |
| 1044 |
|
| 1045 |
#. type: TP |
| 1046 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1047 |
#, no-wrap |
| 1048 |
msgid "B<F_OFD_SETLKW> (I<struct flock *>)" |
| 1049 |
msgstr "" |
| 1050 |
|
| 1051 |
#. type: Plain text |
| 1052 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1053 |
msgid "" |
| 1054 |
"As for B<F_OFD_SETLK>, but if a conflicting lock is held on the file, then " |
| 1055 |
"wait for that lock to be released. If a signal is caught while waiting, " |
| 1056 |
"then the call is interrupted and (after the signal handler has returned) " |
| 1057 |
"returns immediately (with return value -1 and I<errno> set to B<EINTR>; see " |
| 1058 |
"B<signal>(7))." |
| 1059 |
msgstr "" |
| 1060 |
|
| 1061 |
#. type: TP |
| 1062 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1063 |
#, no-wrap |
| 1064 |
msgid "B<F_OFD_GETLK> (I<struct flock *>)" |
| 1065 |
msgstr "" |
| 1066 |
|
| 1067 |
#. type: Plain text |
| 1068 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1069 |
msgid "" |
| 1070 |
"On input to this call, I<lock> describes an open file description lock we " |
| 1071 |
"would like to place on the file. If the lock could be placed, B<fcntl>() " |
| 1072 |
"does not actually place it, but returns B<F_UNLCK> in the I<l_type> field of " |
| 1073 |
"I<lock> and leaves the other fields of the structure unchanged. If one or " |
| 1074 |
"more incompatible locks would prevent this lock being placed, then details " |
| 1075 |
"about one of these locks are returned via I<lock>, as described above for " |
| 1076 |
"B<F_GETLK>." |
| 1077 |
msgstr "" |
| 1078 |
|
| 1079 |
#. commit 57b65325fe34ec4c917bc4e555144b4a94d9e1f7 |
| 1080 |
#. type: Plain text |
| 1081 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1082 |
msgid "" |
| 1083 |
"In the current implementation, no deadlock detection is performed for open " |
| 1084 |
"file description locks. (This contrasts with process-associated record " |
| 1085 |
"locks, for which the kernel does perform deadlock detection.)" |
| 1086 |
msgstr "" |
| 1087 |
|
| 1088 |
#. type: SS |
| 1089 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1090 |
#, no-wrap |
| 1091 |
msgid "Mandatory locking" |
| 1092 |
msgstr "" |
| 1093 |
|
| 1094 |
#. type: Plain text |
| 1095 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1096 |
msgid "" |
| 1097 |
"I<Warning>: the Linux implementation of mandatory locking is unreliable. " |
| 1098 |
"See BUGS below. Because of these bugs, and the fact that the feature is " |
| 1099 |
"believed to be little used, since Linux 4.5, mandatory locking has been made " |
| 1100 |
"an optional feature, governed by a configuration option " |
| 1101 |
"(B<CONFIG_MANDATORY_FILE_LOCKING>). This feature is no longer supported at " |
| 1102 |
"all in Linux 5.15 and above." |
| 1103 |
msgstr "" |
| 1104 |
|
| 1105 |
#. type: Plain text |
| 1106 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1107 |
msgid "" |
| 1108 |
"By default, both traditional (process-associated) and open file description " |
| 1109 |
"record locks are advisory. Advisory locks are not enforced and are useful " |
| 1110 |
"only between cooperating processes." |
| 1111 |
msgstr "" |
| 1112 |
|
| 1113 |
#. type: Plain text |
| 1114 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1115 |
msgid "" |
| 1116 |
"Both lock types can also be mandatory. Mandatory locks are enforced for all " |
| 1117 |
"processes. If a process tries to perform an incompatible access (e.g., " |
| 1118 |
"B<read>(2) or B<write>(2)) on a file region that has an incompatible " |
| 1119 |
"mandatory lock, then the result depends upon whether the B<O_NONBLOCK> flag " |
| 1120 |
"is enabled for its open file description. If the B<O_NONBLOCK> flag is not " |
| 1121 |
"enabled, then the system call is blocked until the lock is removed or " |
| 1122 |
"converted to a mode that is compatible with the access. If the " |
| 1123 |
"B<O_NONBLOCK> flag is enabled, then the system call fails with the error " |
| 1124 |
"B<EAGAIN>." |
| 1125 |
msgstr "" |
| 1126 |
|
| 1127 |
#. type: Plain text |
| 1128 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1129 |
msgid "" |
| 1130 |
"To make use of mandatory locks, mandatory locking must be enabled both on " |
| 1131 |
"the filesystem that contains the file to be locked, and on the file itself. " |
| 1132 |
"Mandatory locking is enabled on a filesystem using the \"-o mand\" option to " |
| 1133 |
"B<mount>(8), or the B<MS_MANDLOCK> flag for B<mount>(2). Mandatory locking " |
| 1134 |
"is enabled on a file by disabling group execute permission on the file and " |
| 1135 |
"enabling the set-group-ID permission bit (see B<chmod>(1) and B<chmod>(2))." |
| 1136 |
msgstr "" |
| 1137 |
|
| 1138 |
#. type: Plain text |
| 1139 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1140 |
msgid "" |
| 1141 |
"Mandatory locking is not specified by POSIX. Some other systems also " |
| 1142 |
"support mandatory locking, although the details of how to enable it vary " |
| 1143 |
"across systems." |
| 1144 |
msgstr "" |
| 1145 |
|
| 1146 |
#. type: SS |
| 1147 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1148 |
#, no-wrap |
| 1149 |
msgid "Lost locks" |
| 1150 |
msgstr "" |
| 1151 |
|
| 1152 |
#. type: Plain text |
| 1153 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1154 |
msgid "" |
| 1155 |
"When an advisory lock is obtained on a networked filesystem such as NFS it " |
| 1156 |
"is possible that the lock might get lost. This may happen due to " |
| 1157 |
"administrative action on the server, or due to a network partition (i.e., " |
| 1158 |
"loss of network connectivity with the server) which lasts long enough for " |
| 1159 |
"the server to assume that the client is no longer functioning." |
| 1160 |
msgstr "" |
| 1161 |
|
| 1162 |
#. commit ef1820f9be27b6ad158f433ab38002ab8131db4d |
| 1163 |
#. type: Plain text |
| 1164 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1165 |
msgid "" |
| 1166 |
"When the filesystem determines that a lock has been lost, future B<read>(2) " |
| 1167 |
"or B<write>(2) requests may fail with the error B<EIO>. This error will " |
| 1168 |
"persist until the lock is removed or the file descriptor is closed. Since " |
| 1169 |
"Linux 3.12, this happens at least for NFSv4 (including all minor versions)." |
| 1170 |
msgstr "" |
| 1171 |
|
| 1172 |
#. type: Plain text |
| 1173 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1174 |
msgid "" |
| 1175 |
"Some versions of UNIX send a signal (B<SIGLOST>) in this circumstance. " |
| 1176 |
"Linux does not define this signal, and does not provide any asynchronous " |
| 1177 |
"notification of lost locks." |
| 1178 |
msgstr "" |
| 1179 |
|
| 1180 |
#. type: Plain text |
| 1181 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1182 |
msgid "" |
| 1183 |
"B<F_GETOWN>, B<F_SETOWN>, B<F_GETOWN_EX>, B<F_SETOWN_EX>, B<F_GETSIG>, and " |
| 1184 |
"B<F_SETSIG> are used to manage I/O availability signals:" |
| 1185 |
msgstr "" |
| 1186 |
|
| 1187 |
#. type: TP |
| 1188 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1189 |
#, no-wrap |
| 1190 |
msgid "B<F_GETOWN> (I<void>)" |
| 1191 |
msgstr "" |
| 1192 |
|
| 1193 |
#. type: Plain text |
| 1194 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1195 |
msgid "" |
| 1196 |
"Return (as the function result) the process ID or process group ID " |
| 1197 |
"currently receiving B<SIGIO> and B<SIGURG> signals for events on file " |
| 1198 |
"descriptor I<fd>. Process IDs are returned as positive values; process " |
| 1199 |
"group IDs are returned as negative values (but see BUGS below). I<arg> is " |
| 1200 |
"ignored." |
| 1201 |
msgstr "" |
| 1202 |
|
| 1203 |
#. type: TP |
| 1204 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1205 |
#, no-wrap |
| 1206 |
msgid "B<F_SETOWN> (I<int>)" |
| 1207 |
msgstr "" |
| 1208 |
|
| 1209 |
#. type: Plain text |
| 1210 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1211 |
msgid "" |
| 1212 |
"Set the process ID or process group ID that will receive B<SIGIO> and " |
| 1213 |
"B<SIGURG> signals for events on the file descriptor I<fd>. The target " |
| 1214 |
"process or process group ID is specified in I<arg>. A process ID is " |
| 1215 |
"specified as a positive value; a process group ID is specified as a negative " |
| 1216 |
"value. Most commonly, the calling process specifies itself as the owner " |
| 1217 |
"(that is, I<arg> is specified as B<getpid>(2))." |
| 1218 |
msgstr "" |
| 1219 |
|
| 1220 |
#. type: Plain text |
| 1221 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1222 |
msgid "" |
| 1223 |
"As well as setting the file descriptor owner, one must also enable " |
| 1224 |
"generation of signals on the file descriptor. This is done by using the " |
| 1225 |
"B<fcntl>() B<F_SETFL> operation to set the B<O_ASYNC> file status flag on " |
| 1226 |
"the file descriptor. Subsequently, a B<SIGIO> signal is sent whenever input " |
| 1227 |
"or output becomes possible on the file descriptor. The B<fcntl>() " |
| 1228 |
"B<F_SETSIG> operation can be used to obtain delivery of a signal other than " |
| 1229 |
"B<SIGIO>." |
| 1230 |
msgstr "" |
| 1231 |
|
| 1232 |
#. type: Plain text |
| 1233 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1234 |
msgid "" |
| 1235 |
"Sending a signal to the owner process (group) specified by B<F_SETOWN> is " |
| 1236 |
"subject to the same permissions checks as are described for B<kill>(2), " |
| 1237 |
"where the sending process is the one that employs B<F_SETOWN> (but see BUGS " |
| 1238 |
"below). If this permission check fails, then the signal is silently " |
| 1239 |
"discarded. I<Note>: The B<F_SETOWN> operation records the caller's " |
| 1240 |
"credentials at the time of the B<fcntl>() call, and it is these saved " |
| 1241 |
"credentials that are used for the permission checks." |
| 1242 |
msgstr "" |
| 1243 |
|
| 1244 |
# |
| 1245 |
#. The following appears to be rubbish. It doesn't seem to |
| 1246 |
#. be true according to the kernel source, and I can write |
| 1247 |
#. a program that gets a terminal-generated SIGIO even though |
| 1248 |
#. it is not the foreground process group of the terminal. |
| 1249 |
#. -- MTK, 8 Apr 05 |
| 1250 |
#. If the file descriptor |
| 1251 |
#. .I fd |
| 1252 |
#. refers to a terminal device, then SIGIO |
| 1253 |
#. signals are sent to the foreground process group of the terminal. |
| 1254 |
#. type: Plain text |
| 1255 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1256 |
msgid "" |
| 1257 |
"If the file descriptor I<fd> refers to a socket, B<F_SETOWN> also selects " |
| 1258 |
"the recipient of B<SIGURG> signals that are delivered when out-of-band data " |
| 1259 |
"arrives on that socket. (B<SIGURG> is sent in any situation where " |
| 1260 |
"B<select>(2) would report the socket as having an \"exceptional " |
| 1261 |
"condition\".)" |
| 1262 |
msgstr "" |
| 1263 |
|
| 1264 |
#. type: Plain text |
| 1265 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1266 |
msgid "The following was true in Linux 2.6.x up to and including Linux 2.6.11:" |
| 1267 |
msgstr "" |
| 1268 |
|
| 1269 |
#. The relevant place in the (2.6) kernel source is the |
| 1270 |
#. 'switch' in fs/fcntl.c::send_sigio_to_task() -- MTK, Apr 2005 |
| 1271 |
#. send_sigurg()/send_sigurg_to_task() bypasses |
| 1272 |
#. kill_fasync()/send_sigio()/send_sigio_to_task() |
| 1273 |
#. to directly call send_group_sig_info() |
| 1274 |
#. -- MTK, Apr 2005 (kernel 2.6.11) |
| 1275 |
#. type: Plain text |
| 1276 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1277 |
msgid "" |
| 1278 |
"If a nonzero value is given to B<F_SETSIG> in a multithreaded process " |
| 1279 |
"running with a threading library that supports thread groups (e.g., NPTL), " |
| 1280 |
"then a positive value given to B<F_SETOWN> has a different meaning: instead " |
| 1281 |
"of being a process ID identifying a whole process, it is a thread ID " |
| 1282 |
"identifying a specific thread within a process. Consequently, it may be " |
| 1283 |
"necessary to pass B<F_SETOWN> the result of B<gettid>(2) instead of " |
| 1284 |
"B<getpid>(2) to get sensible results when B<F_SETSIG> is used. (In current " |
| 1285 |
"Linux threading implementations, a main thread's thread ID is the same as " |
| 1286 |
"its process ID. This means that a single-threaded program can equally use " |
| 1287 |
"B<gettid>(2) or B<getpid>(2) in this scenario.) Note, however, that the " |
| 1288 |
"statements in this paragraph do not apply to the B<SIGURG> signal generated " |
| 1289 |
"for out-of-band data on a socket: this signal is always sent to either a " |
| 1290 |
"process or a process group, depending on the value given to B<F_SETOWN>." |
| 1291 |
msgstr "" |
| 1292 |
|
| 1293 |
#. type: Plain text |
| 1294 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1295 |
msgid "" |
| 1296 |
"The above behavior was accidentally dropped in Linux 2.6.12, and won't be " |
| 1297 |
"restored. From Linux 2.6.32 onward, use B<F_SETOWN_EX> to target B<SIGIO> " |
| 1298 |
"and B<SIGURG> signals at a particular thread." |
| 1299 |
msgstr "" |
| 1300 |
|
| 1301 |
#. type: TP |
| 1302 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1303 |
#, no-wrap |
| 1304 |
msgid "B<F_GETOWN_EX> (I<struct f_owner_ex *>) (since Linux 2.6.32)" |
| 1305 |
msgstr "" |
| 1306 |
|
| 1307 |
#. type: Plain text |
| 1308 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1309 |
msgid "" |
| 1310 |
"Return the current file descriptor owner settings as defined by a previous " |
| 1311 |
"B<F_SETOWN_EX> operation. The information is returned in the structure " |
| 1312 |
"pointed to by I<arg>, which has the following form:" |
| 1313 |
msgstr "" |
| 1314 |
|
| 1315 |
#. type: Plain text |
| 1316 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1317 |
#, no-wrap |
| 1318 |
msgid "" |
| 1319 |
"struct f_owner_ex {\n" |
| 1320 |
" int type;\n" |
| 1321 |
" pid_t pid;\n" |
| 1322 |
"};\n" |
| 1323 |
msgstr "" |
| 1324 |
|
| 1325 |
#. type: Plain text |
| 1326 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1327 |
msgid "" |
| 1328 |
"The I<type> field will have one of the values B<F_OWNER_TID>, " |
| 1329 |
"B<F_OWNER_PID>, or B<F_OWNER_PGRP>. The I<pid> field is a positive integer " |
| 1330 |
"representing a thread ID, process ID, or process group ID. See " |
| 1331 |
"B<F_SETOWN_EX> for more details." |
| 1332 |
msgstr "" |
| 1333 |
|
| 1334 |
#. type: TP |
| 1335 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1336 |
#, no-wrap |
| 1337 |
msgid "B<F_SETOWN_EX> (I<struct f_owner_ex *>) (since Linux 2.6.32)" |
| 1338 |
msgstr "" |
| 1339 |
|
| 1340 |
#. type: Plain text |
| 1341 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1342 |
msgid "" |
| 1343 |
"This operation performs a similar task to B<F_SETOWN>. It allows the caller " |
| 1344 |
"to direct I/O availability signals to a specific thread, process, or process " |
| 1345 |
"group. The caller specifies the target of signals via I<arg>, which is a " |
| 1346 |
"pointer to a I<f_owner_ex> structure. The I<type> field has one of the " |
| 1347 |
"following values, which define how I<pid> is interpreted:" |
| 1348 |
msgstr "" |
| 1349 |
|
| 1350 |
#. type: TP |
| 1351 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1352 |
#, no-wrap |
| 1353 |
msgid "B<F_OWNER_TID>" |
| 1354 |
msgstr "" |
| 1355 |
|
| 1356 |
#. type: Plain text |
| 1357 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1358 |
msgid "" |
| 1359 |
"Send the signal to the thread whose thread ID (the value returned by a call " |
| 1360 |
"to B<clone>(2) or B<gettid>(2)) is specified in I<pid>." |
| 1361 |
msgstr "" |
| 1362 |
|
| 1363 |
#. type: TP |
| 1364 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1365 |
#, no-wrap |
| 1366 |
msgid "B<F_OWNER_PID>" |
| 1367 |
msgstr "" |
| 1368 |
|
| 1369 |
#. type: Plain text |
| 1370 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1371 |
msgid "Send the signal to the process whose ID is specified in I<pid>." |
| 1372 |
msgstr "" |
| 1373 |
|
| 1374 |
#. type: TP |
| 1375 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1376 |
#, no-wrap |
| 1377 |
msgid "B<F_OWNER_PGRP>" |
| 1378 |
msgstr "" |
| 1379 |
|
| 1380 |
#. type: Plain text |
| 1381 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1382 |
msgid "" |
| 1383 |
"Send the signal to the process group whose ID is specified in I<pid>. (Note " |
| 1384 |
"that, unlike with B<F_SETOWN>, a process group ID is specified as a positive " |
| 1385 |
"value here.)" |
| 1386 |
msgstr "" |
| 1387 |
|
| 1388 |
#. type: TP |
| 1389 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1390 |
#, no-wrap |
| 1391 |
msgid "B<F_GETSIG> (I<void>)" |
| 1392 |
msgstr "" |
| 1393 |
|
| 1394 |
#. type: Plain text |
| 1395 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1396 |
msgid "" |
| 1397 |
"Return (as the function result) the signal sent when input or output " |
| 1398 |
"becomes possible. A value of zero means B<SIGIO> is sent. Any other value " |
| 1399 |
"(including B<SIGIO>) is the signal sent instead, and in this case " |
| 1400 |
"additional info is available to the signal handler if installed with " |
| 1401 |
"B<SA_SIGINFO>. I<arg> is ignored." |
| 1402 |
msgstr "" |
| 1403 |
|
| 1404 |
#. type: TP |
| 1405 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1406 |
#, no-wrap |
| 1407 |
msgid "B<F_SETSIG> (I<int>)" |
| 1408 |
msgstr "" |
| 1409 |
|
| 1410 |
# |
| 1411 |
# |
| 1412 |
#. The following was true only up until Linux 2.6.11: |
| 1413 |
#. Additionally, passing a nonzero value to |
| 1414 |
#. .B F_SETSIG |
| 1415 |
#. changes the signal recipient from a whole process to a specific thread |
| 1416 |
#. within a process. |
| 1417 |
#. See the description of |
| 1418 |
#. .B F_SETOWN |
| 1419 |
#. for more details. |
| 1420 |
#. type: Plain text |
| 1421 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1422 |
msgid "" |
| 1423 |
"Set the signal sent when input or output becomes possible to the value given " |
| 1424 |
"in I<arg>. A value of zero means to send the default B<SIGIO> signal. Any " |
| 1425 |
"other value (including B<SIGIO>) is the signal to send instead, and in this " |
| 1426 |
"case additional info is available to the signal handler if installed with " |
| 1427 |
"B<SA_SIGINFO>." |
| 1428 |
msgstr "" |
| 1429 |
|
| 1430 |
#. type: Plain text |
| 1431 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1432 |
msgid "" |
| 1433 |
"By using B<F_SETSIG> with a nonzero value, and setting B<SA_SIGINFO> for the " |
| 1434 |
"signal handler (see B<sigaction>(2)), extra information about I/O events is " |
| 1435 |
"passed to the handler in a I<siginfo_t> structure. If the I<si_code> field " |
| 1436 |
"indicates the source is B<SI_SIGIO>, the I<si_fd> field gives the file " |
| 1437 |
"descriptor associated with the event. Otherwise, there is no indication " |
| 1438 |
"which file descriptors are pending, and you should use the usual mechanisms " |
| 1439 |
"(B<select>(2), B<poll>(2), B<read>(2) with B<O_NONBLOCK> set etc.) to " |
| 1440 |
"determine which file descriptors are available for I/O." |
| 1441 |
msgstr "" |
| 1442 |
|
| 1443 |
#. type: Plain text |
| 1444 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1445 |
msgid "" |
| 1446 |
"Note that the file descriptor provided in I<si_fd> is the one that was " |
| 1447 |
"specified during the B<F_SETSIG> operation. This can lead to an unusual " |
| 1448 |
"corner case. If the file descriptor is duplicated (B<dup>(2) or similar), " |
| 1449 |
"and the original file descriptor is closed, then I/O events will continue to " |
| 1450 |
"be generated, but the I<si_fd> field will contain the number of the now " |
| 1451 |
"closed file descriptor." |
| 1452 |
msgstr "" |
| 1453 |
|
| 1454 |
#. type: Plain text |
| 1455 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1456 |
msgid "" |
| 1457 |
"By selecting a real time signal (value E<gt>= B<SIGRTMIN>), multiple I/O " |
| 1458 |
"events may be queued using the same signal numbers. (Queuing is dependent " |
| 1459 |
"on available memory.) Extra information is available if B<SA_SIGINFO> is " |
| 1460 |
"set for the signal handler, as above." |
| 1461 |
msgstr "" |
| 1462 |
|
| 1463 |
#. See fs/fcntl.c::send_sigio_to_task() (2.4/2.6) sources -- MTK, Apr 05 |
| 1464 |
#. type: Plain text |
| 1465 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1466 |
msgid "" |
| 1467 |
"Note that Linux imposes a limit on the number of real-time signals that may " |
| 1468 |
"be queued to a process (see B<getrlimit>(2) and B<signal>(7)) and if this " |
| 1469 |
"limit is reached, then the kernel reverts to delivering B<SIGIO>, and this " |
| 1470 |
"signal is delivered to the entire process rather than to a specific thread." |
| 1471 |
msgstr "" |
| 1472 |
|
| 1473 |
#. type: Plain text |
| 1474 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1475 |
msgid "" |
| 1476 |
"Using these mechanisms, a program can implement fully asynchronous I/O " |
| 1477 |
"without using B<select>(2) or B<poll>(2) most of the time." |
| 1478 |
msgstr "" |
| 1479 |
|
| 1480 |
#. type: Plain text |
| 1481 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1482 |
msgid "" |
| 1483 |
"The use of B<O_ASYNC> is specific to BSD and Linux. The only use of " |
| 1484 |
"B<F_GETOWN> and B<F_SETOWN> specified in POSIX.1 is in conjunction with the " |
| 1485 |
"use of the B<SIGURG> signal on sockets. (POSIX does not specify the " |
| 1486 |
"B<SIGIO> signal.) B<F_GETOWN_EX>, B<F_SETOWN_EX>, B<F_GETSIG>, and " |
| 1487 |
"B<F_SETSIG> are Linux-specific. POSIX has asynchronous I/O and the " |
| 1488 |
"I<aio_sigevent> structure to achieve similar things; these are also " |
| 1489 |
"available in Linux as part of the GNU C Library (glibc)." |
| 1490 |
msgstr "" |
| 1491 |
|
| 1492 |
#. type: Plain text |
| 1493 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1494 |
msgid "" |
| 1495 |
"B<F_SETLEASE> and B<F_GETLEASE> (Linux 2.4 onward) are used to establish a " |
| 1496 |
"new lease, and retrieve the current lease, on the open file description " |
| 1497 |
"referred to by the file descriptor I<fd>. A file lease provides a mechanism " |
| 1498 |
"whereby the process holding the lease (the \"lease holder\") is notified " |
| 1499 |
"(via delivery of a signal) when a process (the \"lease breaker\") tries to " |
| 1500 |
"B<open>(2) or B<truncate>(2) the file referred to by that file descriptor." |
| 1501 |
msgstr "" |
| 1502 |
|
| 1503 |
#. type: TP |
| 1504 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1505 |
#, no-wrap |
| 1506 |
msgid "B<F_SETLEASE> (I<int>)" |
| 1507 |
msgstr "" |
| 1508 |
|
| 1509 |
#. type: Plain text |
| 1510 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1511 |
msgid "" |
| 1512 |
"Set or remove a file lease according to which of the following values is " |
| 1513 |
"specified in the integer I<arg>:" |
| 1514 |
msgstr "" |
| 1515 |
|
| 1516 |
#. type: TP |
| 1517 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1518 |
#, no-wrap |
| 1519 |
msgid "B<F_RDLCK>" |
| 1520 |
msgstr "" |
| 1521 |
|
| 1522 |
#. The following became true in Linux 2.6.10: |
| 1523 |
#. See the man-pages-2.09 Changelog for further info. |
| 1524 |
#. type: Plain text |
| 1525 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1526 |
msgid "" |
| 1527 |
"Take out a read lease. This will cause the calling process to be notified " |
| 1528 |
"when the file is opened for writing or is truncated. A read lease can be " |
| 1529 |
"placed only on a file descriptor that is opened read-only." |
| 1530 |
msgstr "" |
| 1531 |
|
| 1532 |
#. type: TP |
| 1533 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1534 |
#, no-wrap |
| 1535 |
msgid "B<F_WRLCK>" |
| 1536 |
msgstr "" |
| 1537 |
|
| 1538 |
#. type: Plain text |
| 1539 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1540 |
msgid "" |
| 1541 |
"Take out a write lease. This will cause the caller to be notified when the " |
| 1542 |
"file is opened for reading or writing or is truncated. A write lease may be " |
| 1543 |
"placed on a file only if there are no other open file descriptors for the " |
| 1544 |
"file." |
| 1545 |
msgstr "" |
| 1546 |
|
| 1547 |
#. type: TP |
| 1548 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1549 |
#, no-wrap |
| 1550 |
msgid "B<F_UNLCK>" |
| 1551 |
msgstr "" |
| 1552 |
|
| 1553 |
#. type: Plain text |
| 1554 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1555 |
msgid "Remove our lease from the file." |
| 1556 |
msgstr "" |
| 1557 |
|
| 1558 |
#. type: Plain text |
| 1559 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1560 |
msgid "" |
| 1561 |
"Leases are associated with an open file description (see B<open>(2)). This " |
| 1562 |
"means that duplicate file descriptors (created by, for example, B<fork>(2) " |
| 1563 |
"or B<dup>(2)) refer to the same lease, and this lease may be modified or " |
| 1564 |
"released using any of these descriptors. Furthermore, the lease is released " |
| 1565 |
"by either an explicit B<F_UNLCK> operation on any of these duplicate file " |
| 1566 |
"descriptors, or when all such file descriptors have been closed." |
| 1567 |
msgstr "" |
| 1568 |
|
| 1569 |
#. type: Plain text |
| 1570 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1571 |
msgid "" |
| 1572 |
"Leases may be taken out only on regular files. An unprivileged process may " |
| 1573 |
"take out a lease only on a file whose UID (owner) matches the filesystem UID " |
| 1574 |
"of the process. A process with the B<CAP_LEASE> capability may take out " |
| 1575 |
"leases on arbitrary files." |
| 1576 |
msgstr "" |
| 1577 |
|
| 1578 |
#. type: TP |
| 1579 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1580 |
#, no-wrap |
| 1581 |
msgid "B<F_GETLEASE> (I<void>)" |
| 1582 |
msgstr "" |
| 1583 |
|
| 1584 |
#. type: Plain text |
| 1585 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1586 |
msgid "" |
| 1587 |
"Indicates what type of lease is associated with the file descriptor I<fd> by " |
| 1588 |
"returning either B<F_RDLCK>, B<F_WRLCK>, or B<F_UNLCK>, indicating, " |
| 1589 |
"respectively, a read lease , a write lease, or no lease. I<arg> is ignored." |
| 1590 |
msgstr "" |
| 1591 |
|
| 1592 |
#. type: Plain text |
| 1593 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1594 |
msgid "" |
| 1595 |
"When a process (the \"lease breaker\") performs an B<open>(2) or " |
| 1596 |
"B<truncate>(2) that conflicts with a lease established via B<F_SETLEASE>, " |
| 1597 |
"the system call is blocked by the kernel and the kernel notifies the lease " |
| 1598 |
"holder by sending it a signal (B<SIGIO> by default). The lease holder " |
| 1599 |
"should respond to receipt of this signal by doing whatever cleanup is " |
| 1600 |
"required in preparation for the file to be accessed by another process " |
| 1601 |
"(e.g., flushing cached buffers) and then either remove or downgrade its " |
| 1602 |
"lease. A lease is removed by performing an B<F_SETLEASE> operation " |
| 1603 |
"specifying I<arg> as B<F_UNLCK>. If the lease holder currently holds a " |
| 1604 |
"write lease on the file, and the lease breaker is opening the file for " |
| 1605 |
"reading, then it is sufficient for the lease holder to downgrade the lease " |
| 1606 |
"to a read lease. This is done by performing an B<F_SETLEASE> operation " |
| 1607 |
"specifying I<arg> as B<F_RDLCK>." |
| 1608 |
msgstr "" |
| 1609 |
|
| 1610 |
#. type: Plain text |
| 1611 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1612 |
msgid "" |
| 1613 |
"If the lease holder fails to downgrade or remove the lease within the number " |
| 1614 |
"of seconds specified in I</proc/sys/fs/lease-break-time>, then the kernel " |
| 1615 |
"forcibly removes or downgrades the lease holder's lease." |
| 1616 |
msgstr "" |
| 1617 |
|
| 1618 |
#. type: Plain text |
| 1619 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1620 |
msgid "" |
| 1621 |
"Once a lease break has been initiated, B<F_GETLEASE> returns the target " |
| 1622 |
"lease type (either B<F_RDLCK> or B<F_UNLCK>, depending on what would be " |
| 1623 |
"compatible with the lease breaker) until the lease holder voluntarily " |
| 1624 |
"downgrades or removes the lease or the kernel forcibly does so after the " |
| 1625 |
"lease break timer expires." |
| 1626 |
msgstr "" |
| 1627 |
|
| 1628 |
#. type: Plain text |
| 1629 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1630 |
msgid "" |
| 1631 |
"Once the lease has been voluntarily or forcibly removed or downgraded, and " |
| 1632 |
"assuming the lease breaker has not unblocked its system call, the kernel " |
| 1633 |
"permits the lease breaker's system call to proceed." |
| 1634 |
msgstr "" |
| 1635 |
|
| 1636 |
#. type: Plain text |
| 1637 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1638 |
msgid "" |
| 1639 |
"If the lease breaker's blocked B<open>(2) or B<truncate>(2) is interrupted " |
| 1640 |
"by a signal handler, then the system call fails with the error B<EINTR>, but " |
| 1641 |
"the other steps still occur as described above. If the lease breaker is " |
| 1642 |
"killed by a signal while blocked in B<open>(2) or B<truncate>(2), then the " |
| 1643 |
"other steps still occur as described above. If the lease breaker specifies " |
| 1644 |
"the B<O_NONBLOCK> flag when calling B<open>(2), then the call immediately " |
| 1645 |
"fails with the error B<EWOULDBLOCK>, but the other steps still occur as " |
| 1646 |
"described above." |
| 1647 |
msgstr "" |
| 1648 |
|
| 1649 |
#. type: Plain text |
| 1650 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1651 |
msgid "" |
| 1652 |
"The default signal used to notify the lease holder is B<SIGIO>, but this can " |
| 1653 |
"be changed using the B<F_SETSIG> operation to B<fcntl>(). If a B<F_SETSIG> " |
| 1654 |
"operation is performed (even one specifying B<SIGIO>), and the signal " |
| 1655 |
"handler is established using B<SA_SIGINFO>, then the handler will receive a " |
| 1656 |
"I<siginfo_t> structure as its second argument, and the I<si_fd> field of " |
| 1657 |
"this argument will hold the file descriptor of the leased file that has been " |
| 1658 |
"accessed by another process. (This is useful if the caller holds leases " |
| 1659 |
"against multiple files.)" |
| 1660 |
msgstr "" |
| 1661 |
|
| 1662 |
#. type: TP |
| 1663 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1664 |
#, no-wrap |
| 1665 |
msgid "B<F_NOTIFY> (I<int>)" |
| 1666 |
msgstr "" |
| 1667 |
|
| 1668 |
#. type: Plain text |
| 1669 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1670 |
msgid "" |
| 1671 |
"(Linux 2.4 onward) Provide notification when the directory referred to by " |
| 1672 |
"I<fd> or any of the files that it contains is changed. The events to be " |
| 1673 |
"notified are specified in I<arg>, which is a bit mask specified by ORing " |
| 1674 |
"together zero or more of the following bits:" |
| 1675 |
msgstr "" |
| 1676 |
|
| 1677 |
#. type: TP |
| 1678 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1679 |
#, no-wrap |
| 1680 |
msgid "B<DN_ACCESS>" |
| 1681 |
msgstr "" |
| 1682 |
|
| 1683 |
#. type: Plain text |
| 1684 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1685 |
msgid "A file was accessed (B<read>(2), B<pread>(2), B<readv>(2), and similar)" |
| 1686 |
msgstr "" |
| 1687 |
|
| 1688 |
#. type: TP |
| 1689 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1690 |
#, no-wrap |
| 1691 |
msgid "B<DN_MODIFY>" |
| 1692 |
msgstr "" |
| 1693 |
|
| 1694 |
#. type: Plain text |
| 1695 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1696 |
msgid "" |
| 1697 |
"A file was modified (B<write>(2), B<pwrite>(2), B<writev>(2), " |
| 1698 |
"B<truncate>(2), B<ftruncate>(2), and similar)." |
| 1699 |
msgstr "" |
| 1700 |
|
| 1701 |
#. type: TP |
| 1702 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1703 |
#, no-wrap |
| 1704 |
msgid "B<DN_CREATE>" |
| 1705 |
msgstr "" |
| 1706 |
|
| 1707 |
#. type: Plain text |
| 1708 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1709 |
msgid "" |
| 1710 |
"A file was created (B<open>(2), B<creat>(2), B<mknod>(2), B<mkdir>(2), " |
| 1711 |
"B<link>(2), B<symlink>(2), B<rename>(2) into this directory)." |
| 1712 |
msgstr "" |
| 1713 |
|
| 1714 |
#. type: TP |
| 1715 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1716 |
#, no-wrap |
| 1717 |
msgid "B<DN_DELETE>" |
| 1718 |
msgstr "" |
| 1719 |
|
| 1720 |
#. type: Plain text |
| 1721 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1722 |
msgid "" |
| 1723 |
"A file was unlinked (B<unlink>(2), B<rename>(2) to another directory, " |
| 1724 |
"B<rmdir>(2))." |
| 1725 |
msgstr "" |
| 1726 |
|
| 1727 |
#. type: TP |
| 1728 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1729 |
#, no-wrap |
| 1730 |
msgid "B<DN_RENAME>" |
| 1731 |
msgstr "" |
| 1732 |
|
| 1733 |
#. type: Plain text |
| 1734 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1735 |
msgid "A file was renamed within this directory (B<rename>(2))." |
| 1736 |
msgstr "" |
| 1737 |
|
| 1738 |
#. type: TP |
| 1739 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1740 |
#, no-wrap |
| 1741 |
msgid "B<DN_ATTRIB>" |
| 1742 |
msgstr "" |
| 1743 |
|
| 1744 |
#. type: Plain text |
| 1745 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1746 |
msgid "" |
| 1747 |
"The attributes of a file were changed (B<chown>(2), B<chmod>(2), " |
| 1748 |
"B<utime>(2), B<utimensat>(2), and similar)." |
| 1749 |
msgstr "" |
| 1750 |
|
| 1751 |
#. type: Plain text |
| 1752 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1753 |
msgid "" |
| 1754 |
"(In order to obtain these definitions, the B<_GNU_SOURCE> feature test macro " |
| 1755 |
"must be defined before including I<any> header files.)" |
| 1756 |
msgstr "" |
| 1757 |
|
| 1758 |
#. type: Plain text |
| 1759 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1760 |
msgid "" |
| 1761 |
"Directory notifications are normally \"one-shot\", and the application must " |
| 1762 |
"reregister to receive further notifications. Alternatively, if " |
| 1763 |
"B<DN_MULTISHOT> is included in I<arg>, then notification will remain in " |
| 1764 |
"effect until explicitly removed." |
| 1765 |
msgstr "" |
| 1766 |
|
| 1767 |
#. The following does seem a poor API-design choice... |
| 1768 |
#. type: Plain text |
| 1769 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1770 |
msgid "" |
| 1771 |
"A series of B<F_NOTIFY> requests is cumulative, with the events in I<arg> " |
| 1772 |
"being added to the set already monitored. To disable notification of all " |
| 1773 |
"events, make an B<F_NOTIFY> call specifying I<arg> as 0." |
| 1774 |
msgstr "" |
| 1775 |
|
| 1776 |
#. type: Plain text |
| 1777 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1778 |
msgid "" |
| 1779 |
"Notification occurs via delivery of a signal. The default signal is " |
| 1780 |
"B<SIGIO>, but this can be changed using the B<F_SETSIG> operation to " |
| 1781 |
"B<fcntl>(). (Note that B<SIGIO> is one of the nonqueuing standard signals; " |
| 1782 |
"switching to the use of a real-time signal means that multiple notifications " |
| 1783 |
"can be queued to the process.) In the latter case, the signal handler " |
| 1784 |
"receives a I<siginfo_t> structure as its second argument (if the handler was " |
| 1785 |
"established using B<SA_SIGINFO>) and the I<si_fd> field of this structure " |
| 1786 |
"contains the file descriptor which generated the notification (useful when " |
| 1787 |
"establishing notification on multiple directories)." |
| 1788 |
msgstr "" |
| 1789 |
|
| 1790 |
#. type: Plain text |
| 1791 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1792 |
msgid "" |
| 1793 |
"Especially when using B<DN_MULTISHOT>, a real time signal should be used for " |
| 1794 |
"notification, so that multiple notifications can be queued." |
| 1795 |
msgstr "" |
| 1796 |
|
| 1797 |
#. type: Plain text |
| 1798 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1799 |
msgid "" |
| 1800 |
"B<NOTE:> New applications should use the I<inotify> interface (available " |
| 1801 |
"since Linux 2.6.13), which provides a much superior interface for obtaining " |
| 1802 |
"notifications of filesystem events. See B<inotify>(7)." |
| 1803 |
msgstr "" |
| 1804 |
|
| 1805 |
#. type: TP |
| 1806 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1807 |
#, no-wrap |
| 1808 |
msgid "B<F_SETPIPE_SZ> (I<int>; since Linux 2.6.35)" |
| 1809 |
msgstr "" |
| 1810 |
|
| 1811 |
#. type: Plain text |
| 1812 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1813 |
msgid "" |
| 1814 |
"Change the capacity of the pipe referred to by I<fd> to be at least I<arg> " |
| 1815 |
"bytes. An unprivileged process can adjust the pipe capacity to any value " |
| 1816 |
"between the system page size and the limit defined in I</proc/sys/fs/pipe-" |
| 1817 |
"max-size> (see B<proc>(5)). Attempts to set the pipe capacity below the " |
| 1818 |
"page size are silently rounded up to the page size. Attempts by an " |
| 1819 |
"unprivileged process to set the pipe capacity above the limit in I</proc/sys/" |
| 1820 |
"fs/pipe-max-size> yield the error B<EPERM>; a privileged process " |
| 1821 |
"(B<CAP_SYS_RESOURCE>) can override the limit." |
| 1822 |
msgstr "" |
| 1823 |
|
| 1824 |
#. type: Plain text |
| 1825 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1826 |
msgid "" |
| 1827 |
"When allocating the buffer for the pipe, the kernel may use a capacity " |
| 1828 |
"larger than I<arg>, if that is convenient for the implementation. (In the " |
| 1829 |
"current implementation, the allocation is the next higher power-of-two page-" |
| 1830 |
"size multiple of the requested size.) The actual capacity (in bytes) that " |
| 1831 |
"is set is returned as the function result." |
| 1832 |
msgstr "" |
| 1833 |
|
| 1834 |
#. type: Plain text |
| 1835 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1836 |
msgid "" |
| 1837 |
"Attempting to set the pipe capacity smaller than the amount of buffer space " |
| 1838 |
"currently used to store data produces the error B<EBUSY>." |
| 1839 |
msgstr "" |
| 1840 |
|
| 1841 |
#. type: Plain text |
| 1842 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1843 |
msgid "" |
| 1844 |
"Note that because of the way the pages of the pipe buffer are employed when " |
| 1845 |
"data is written to the pipe, the number of bytes that can be written may be " |
| 1846 |
"less than the nominal size, depending on the size of the writes." |
| 1847 |
msgstr "" |
| 1848 |
|
| 1849 |
#. type: TP |
| 1850 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1851 |
#, no-wrap |
| 1852 |
msgid "B<F_GETPIPE_SZ> (I<void>; since Linux 2.6.35)" |
| 1853 |
msgstr "" |
| 1854 |
|
| 1855 |
#. type: Plain text |
| 1856 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1857 |
msgid "" |
| 1858 |
"Return (as the function result) the capacity of the pipe referred to by " |
| 1859 |
"I<fd>." |
| 1860 |
msgstr "" |
| 1861 |
|
| 1862 |
#. type: Plain text |
| 1863 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1864 |
msgid "" |
| 1865 |
"File seals limit the set of allowed operations on a given file. For each " |
| 1866 |
"seal that is set on a file, a specific set of operations will fail with " |
| 1867 |
"B<EPERM> on this file from now on. The file is said to be sealed. The " |
| 1868 |
"default set of seals depends on the type of the underlying file and " |
| 1869 |
"filesystem. For an overview of file sealing, a discussion of its purpose, " |
| 1870 |
"and some code examples, see B<memfd_create>(2)." |
| 1871 |
msgstr "" |
| 1872 |
|
| 1873 |
#. type: Plain text |
| 1874 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1875 |
msgid "" |
| 1876 |
"Currently, file seals can be applied only to a file descriptor returned by " |
| 1877 |
"B<memfd_create>(2) (if the B<MFD_ALLOW_SEALING> was employed). On other " |
| 1878 |
"filesystems, all B<fcntl>() operations that operate on seals will return " |
| 1879 |
"B<EINVAL>." |
| 1880 |
msgstr "" |
| 1881 |
|
| 1882 |
#. type: Plain text |
| 1883 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1884 |
msgid "" |
| 1885 |
"Seals are a property of an inode. Thus, all open file descriptors referring " |
| 1886 |
"to the same inode share the same set of seals. Furthermore, seals can never " |
| 1887 |
"be removed, only added." |
| 1888 |
msgstr "" |
| 1889 |
|
| 1890 |
#. type: TP |
| 1891 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1892 |
#, no-wrap |
| 1893 |
msgid "B<F_ADD_SEALS> (I<int>; since Linux 3.17)" |
| 1894 |
msgstr "" |
| 1895 |
|
| 1896 |
#. type: Plain text |
| 1897 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1898 |
msgid "" |
| 1899 |
"Add the seals given in the bit-mask argument I<arg> to the set of seals of " |
| 1900 |
"the inode referred to by the file descriptor I<fd>. Seals cannot be removed " |
| 1901 |
"again. Once this call succeeds, the seals are enforced by the kernel " |
| 1902 |
"immediately. If the current set of seals includes B<F_SEAL_SEAL> (see " |
| 1903 |
"below), then this call will be rejected with B<EPERM>. Adding a seal that " |
| 1904 |
"is already set is a no-op, in case B<F_SEAL_SEAL> is not set already. In " |
| 1905 |
"order to place a seal, the file descriptor I<fd> must be writable." |
| 1906 |
msgstr "" |
| 1907 |
|
| 1908 |
#. type: TP |
| 1909 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1910 |
#, no-wrap |
| 1911 |
msgid "B<F_GET_SEALS> (I<void>; since Linux 3.17)" |
| 1912 |
msgstr "" |
| 1913 |
|
| 1914 |
#. type: Plain text |
| 1915 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1916 |
msgid "" |
| 1917 |
"Return (as the function result) the current set of seals of the inode " |
| 1918 |
"referred to by I<fd>. If no seals are set, 0 is returned. If the file does " |
| 1919 |
"not support sealing, -1 is returned and I<errno> is set to B<EINVAL>." |
| 1920 |
msgstr "" |
| 1921 |
|
| 1922 |
#. type: Plain text |
| 1923 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1924 |
msgid "The following seals are available:" |
| 1925 |
msgstr "" |
| 1926 |
|
| 1927 |
#. type: TP |
| 1928 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1929 |
#, no-wrap |
| 1930 |
msgid "B<F_SEAL_SEAL>" |
| 1931 |
msgstr "" |
| 1932 |
|
| 1933 |
#. type: Plain text |
| 1934 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1935 |
msgid "" |
| 1936 |
"If this seal is set, any further call to B<fcntl>() with B<F_ADD_SEALS> " |
| 1937 |
"fails with the error B<EPERM>. Therefore, this seal prevents any " |
| 1938 |
"modifications to the set of seals itself. If the initial set of seals of a " |
| 1939 |
"file includes B<F_SEAL_SEAL>, then this effectively causes the set of seals " |
| 1940 |
"to be constant and locked." |
| 1941 |
msgstr "" |
| 1942 |
|
| 1943 |
#. type: TP |
| 1944 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1945 |
#, no-wrap |
| 1946 |
msgid "B<F_SEAL_SHRINK>" |
| 1947 |
msgstr "" |
| 1948 |
|
| 1949 |
#. type: Plain text |
| 1950 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1951 |
msgid "" |
| 1952 |
"If this seal is set, the file in question cannot be reduced in size. This " |
| 1953 |
"affects B<open>(2) with the B<O_TRUNC> flag as well as B<truncate>(2) and " |
| 1954 |
"B<ftruncate>(2). Those calls fail with B<EPERM> if you try to shrink the " |
| 1955 |
"file in question. Increasing the file size is still possible." |
| 1956 |
msgstr "" |
| 1957 |
|
| 1958 |
#. type: TP |
| 1959 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1960 |
#, no-wrap |
| 1961 |
msgid "B<F_SEAL_GROW>" |
| 1962 |
msgstr "" |
| 1963 |
|
| 1964 |
#. type: Plain text |
| 1965 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1966 |
msgid "" |
| 1967 |
"If this seal is set, the size of the file in question cannot be increased. " |
| 1968 |
"This affects B<write>(2) beyond the end of the file, B<truncate>(2), " |
| 1969 |
"B<ftruncate>(2), and B<fallocate>(2). These calls fail with B<EPERM> if you " |
| 1970 |
"use them to increase the file size. If you keep the size or shrink it, " |
| 1971 |
"those calls still work as expected." |
| 1972 |
msgstr "" |
| 1973 |
|
| 1974 |
#. type: TP |
| 1975 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1976 |
#, no-wrap |
| 1977 |
msgid "B<F_SEAL_WRITE>" |
| 1978 |
msgstr "" |
| 1979 |
|
| 1980 |
#. One or more other seals are typically used with F_SEAL_WRITE |
| 1981 |
#. because, given a file with the F_SEAL_WRITE seal set, then, |
| 1982 |
#. while it would no longer be possible to (say) write zeros into |
| 1983 |
#. the last 100 bytes of a file, it would still be possible |
| 1984 |
#. to (say) shrink the file by 100 bytes using ftruncate(), and |
| 1985 |
#. then increase the file size by 100 bytes, which would have |
| 1986 |
#. the effect of replacing the last hundred bytes by zeros. |
| 1987 |
#. type: Plain text |
| 1988 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1989 |
msgid "" |
| 1990 |
"If this seal is set, you cannot modify the contents of the file. Note that " |
| 1991 |
"shrinking or growing the size of the file is still possible and allowed. " |
| 1992 |
"Thus, this seal is normally used in combination with one of the other " |
| 1993 |
"seals. This seal affects B<write>(2) and B<fallocate>(2) (only in " |
| 1994 |
"combination with the B<FALLOC_FL_PUNCH_HOLE> flag). Those calls fail with " |
| 1995 |
"B<EPERM> if this seal is set. Furthermore, trying to create new shared, " |
| 1996 |
"writable memory-mappings via B<mmap>(2) will also fail with B<EPERM>." |
| 1997 |
msgstr "" |
| 1998 |
|
| 1999 |
#. type: Plain text |
| 2000 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2001 |
msgid "" |
| 2002 |
"Using the B<F_ADD_SEALS> operation to set the B<F_SEAL_WRITE> seal fails " |
| 2003 |
"with B<EBUSY> if any writable, shared mapping exists. Such mappings must be " |
| 2004 |
"unmapped before you can add this seal. Furthermore, if there are any " |
| 2005 |
"asynchronous I/O operations (B<io_submit>(2)) pending on the file, all " |
| 2006 |
"outstanding writes will be discarded." |
| 2007 |
msgstr "" |
| 2008 |
|
| 2009 |
#. type: TP |
| 2010 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2011 |
#, no-wrap |
| 2012 |
msgid "B<F_SEAL_FUTURE_WRITE> (since Linux 5.1)" |
| 2013 |
msgstr "" |
| 2014 |
|
| 2015 |
#. type: Plain text |
| 2016 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2017 |
msgid "" |
| 2018 |
"The effect of this seal is similar to B<F_SEAL_WRITE>, but the contents of " |
| 2019 |
"the file can still be modified via shared writable mappings that were " |
| 2020 |
"created prior to the seal being set. Any attempt to create a new writable " |
| 2021 |
"mapping on the file via B<mmap>(2) will fail with B<EPERM>. Likewise, an " |
| 2022 |
"attempt to write to the file via B<write>(2) will fail with B<EPERM>." |
| 2023 |
msgstr "" |
| 2024 |
|
| 2025 |
#. type: Plain text |
| 2026 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2027 |
msgid "" |
| 2028 |
"Using this seal, one process can create a memory buffer that it can continue " |
| 2029 |
"to modify while sharing that buffer on a \"read-only\" basis with other " |
| 2030 |
"processes." |
| 2031 |
msgstr "" |
| 2032 |
|
| 2033 |
#. type: Plain text |
| 2034 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2035 |
msgid "" |
| 2036 |
"Write lifetime hints can be used to inform the kernel about the relative " |
| 2037 |
"expected lifetime of writes on a given inode or via a particular open file " |
| 2038 |
"description. (See B<open>(2) for an explanation of open file " |
| 2039 |
"descriptions.) In this context, the term \"write lifetime\" means the " |
| 2040 |
"expected time the data will live on media, before being overwritten or " |
| 2041 |
"erased." |
| 2042 |
msgstr "" |
| 2043 |
|
| 2044 |
#. type: Plain text |
| 2045 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2046 |
msgid "" |
| 2047 |
"An application may use the different hint values specified below to separate " |
| 2048 |
"writes into different write classes, so that multiple users or applications " |
| 2049 |
"running on a single storage back-end can aggregate their I/O patterns in a " |
| 2050 |
"consistent manner. However, there are no functional semantics implied by " |
| 2051 |
"these flags, and different I/O classes can use the write lifetime hints in " |
| 2052 |
"arbitrary ways, so long as the hints are used consistently." |
| 2053 |
msgstr "" |
| 2054 |
|
| 2055 |
#. type: Plain text |
| 2056 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2057 |
msgid "The following operations can be applied to the file descriptor, I<fd>:" |
| 2058 |
msgstr "" |
| 2059 |
|
| 2060 |
#. type: TP |
| 2061 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2062 |
#, no-wrap |
| 2063 |
msgid "B<F_GET_RW_HINT> (I<uint64_t *>; since Linux 4.13)" |
| 2064 |
msgstr "" |
| 2065 |
|
| 2066 |
#. type: Plain text |
| 2067 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2068 |
msgid "" |
| 2069 |
"Returns the value of the read/write hint associated with the underlying " |
| 2070 |
"inode referred to by I<fd>." |
| 2071 |
msgstr "" |
| 2072 |
|
| 2073 |
#. type: TP |
| 2074 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2075 |
#, no-wrap |
| 2076 |
msgid "B<F_SET_RW_HINT> (I<uint64_t *>; since Linux 4.13)" |
| 2077 |
msgstr "" |
| 2078 |
|
| 2079 |
#. type: Plain text |
| 2080 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2081 |
msgid "" |
| 2082 |
"Sets the read/write hint value associated with the underlying inode referred " |
| 2083 |
"to by I<fd>. This hint persists until either it is explicitly modified or " |
| 2084 |
"the underlying filesystem is unmounted." |
| 2085 |
msgstr "" |
| 2086 |
|
| 2087 |
#. type: TP |
| 2088 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2089 |
#, no-wrap |
| 2090 |
msgid "B<F_GET_FILE_RW_HINT> (I<uint64_t *>; since Linux 4.13)" |
| 2091 |
msgstr "" |
| 2092 |
|
| 2093 |
#. type: Plain text |
| 2094 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2095 |
msgid "" |
| 2096 |
"Returns the value of the read/write hint associated with the open file " |
| 2097 |
"description referred to by I<fd>." |
| 2098 |
msgstr "" |
| 2099 |
|
| 2100 |
#. type: TP |
| 2101 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2102 |
#, no-wrap |
| 2103 |
msgid "B<F_SET_FILE_RW_HINT> (I<uint64_t *>; since Linux 4.13)" |
| 2104 |
msgstr "" |
| 2105 |
|
| 2106 |
#. type: Plain text |
| 2107 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2108 |
msgid "" |
| 2109 |
"Sets the read/write hint value associated with the open file description " |
| 2110 |
"referred to by I<fd>." |
| 2111 |
msgstr "" |
| 2112 |
|
| 2113 |
#. type: Plain text |
| 2114 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2115 |
msgid "" |
| 2116 |
"If an open file description has not been assigned a read/write hint, then it " |
| 2117 |
"shall use the value assigned to the inode, if any." |
| 2118 |
msgstr "" |
| 2119 |
|
| 2120 |
#. type: Plain text |
| 2121 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2122 |
msgid "The following read/write hints are valid since Linux 4.13:" |
| 2123 |
msgstr "" |
| 2124 |
|
| 2125 |
#. type: TP |
| 2126 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2127 |
#, no-wrap |
| 2128 |
msgid "B<RWH_WRITE_LIFE_NOT_SET>" |
| 2129 |
msgstr "" |
| 2130 |
|
| 2131 |
#. type: Plain text |
| 2132 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2133 |
msgid "No specific hint has been set. This is the default value." |
| 2134 |
msgstr "" |
| 2135 |
|
| 2136 |
#. type: TP |
| 2137 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2138 |
#, no-wrap |
| 2139 |
msgid "B<RWH_WRITE_LIFE_NONE>" |
| 2140 |
msgstr "" |
| 2141 |
|
| 2142 |
#. type: Plain text |
| 2143 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2144 |
msgid "No specific write lifetime is associated with this file or inode." |
| 2145 |
msgstr "" |
| 2146 |
|
| 2147 |
#. type: TP |
| 2148 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2149 |
#, no-wrap |
| 2150 |
msgid "B<RWH_WRITE_LIFE_SHORT>" |
| 2151 |
msgstr "" |
| 2152 |
|
| 2153 |
#. type: Plain text |
| 2154 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2155 |
msgid "" |
| 2156 |
"Data written to this inode or via this open file description is expected to " |
| 2157 |
"have a short lifetime." |
| 2158 |
msgstr "" |
| 2159 |
|
| 2160 |
#. type: TP |
| 2161 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2162 |
#, no-wrap |
| 2163 |
msgid "B<RWH_WRITE_LIFE_MEDIUM>" |
| 2164 |
msgstr "" |
| 2165 |
|
| 2166 |
#. type: Plain text |
| 2167 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2168 |
msgid "" |
| 2169 |
"Data written to this inode or via this open file description is expected to " |
| 2170 |
"have a lifetime longer than data written with B<RWH_WRITE_LIFE_SHORT>." |
| 2171 |
msgstr "" |
| 2172 |
|
| 2173 |
#. type: TP |
| 2174 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2175 |
#, no-wrap |
| 2176 |
msgid "B<RWH_WRITE_LIFE_LONG>" |
| 2177 |
msgstr "" |
| 2178 |
|
| 2179 |
#. type: Plain text |
| 2180 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2181 |
msgid "" |
| 2182 |
"Data written to this inode or via this open file description is expected to " |
| 2183 |
"have a lifetime longer than data written with B<RWH_WRITE_LIFE_MEDIUM>." |
| 2184 |
msgstr "" |
| 2185 |
|
| 2186 |
#. type: TP |
| 2187 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2188 |
#, no-wrap |
| 2189 |
msgid "B<RWH_WRITE_LIFE_EXTREME>" |
| 2190 |
msgstr "" |
| 2191 |
|
| 2192 |
#. type: Plain text |
| 2193 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2194 |
msgid "" |
| 2195 |
"Data written to this inode or via this open file description is expected to " |
| 2196 |
"have a lifetime longer than data written with B<RWH_WRITE_LIFE_LONG>." |
| 2197 |
msgstr "" |
| 2198 |
|
| 2199 |
#. type: Plain text |
| 2200 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2201 |
msgid "" |
| 2202 |
"All the write-specific hints are relative to each other, and no individual " |
| 2203 |
"absolute meaning should be attributed to them." |
| 2204 |
msgstr "" |
| 2205 |
|
| 2206 |
#. type: Plain text |
| 2207 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2208 |
msgid "For a successful call, the return value depends on the operation:" |
| 2209 |
msgstr "" |
| 2210 |
|
| 2211 |
#. type: TP |
| 2212 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2213 |
#, no-wrap |
| 2214 |
msgid "B<F_DUPFD>" |
| 2215 |
msgstr "" |
| 2216 |
|
| 2217 |
#. type: Plain text |
| 2218 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2219 |
msgid "The new file descriptor." |
| 2220 |
msgstr "" |
| 2221 |
|
| 2222 |
#. type: TP |
| 2223 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2224 |
#, no-wrap |
| 2225 |
msgid "B<F_GETFD>" |
| 2226 |
msgstr "" |
| 2227 |
|
| 2228 |
#. type: Plain text |
| 2229 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2230 |
msgid "Value of file descriptor flags." |
| 2231 |
msgstr "" |
| 2232 |
|
| 2233 |
#. type: TP |
| 2234 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2235 |
#, no-wrap |
| 2236 |
msgid "B<F_GETFL>" |
| 2237 |
msgstr "" |
| 2238 |
|
| 2239 |
#. type: Plain text |
| 2240 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2241 |
msgid "Value of file status flags." |
| 2242 |
msgstr "" |
| 2243 |
|
| 2244 |
#. type: TP |
| 2245 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2246 |
#, no-wrap |
| 2247 |
msgid "B<F_GETLEASE>" |
| 2248 |
msgstr "" |
| 2249 |
|
| 2250 |
#. type: Plain text |
| 2251 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2252 |
msgid "Type of lease held on file descriptor." |
| 2253 |
msgstr "" |
| 2254 |
|
| 2255 |
#. type: TP |
| 2256 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2257 |
#, no-wrap |
| 2258 |
msgid "B<F_GETOWN>" |
| 2259 |
msgstr "" |
| 2260 |
|
| 2261 |
#. type: Plain text |
| 2262 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2263 |
msgid "Value of file descriptor owner." |
| 2264 |
msgstr "" |
| 2265 |
|
| 2266 |
#. type: TP |
| 2267 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2268 |
#, no-wrap |
| 2269 |
msgid "B<F_GETSIG>" |
| 2270 |
msgstr "" |
| 2271 |
|
| 2272 |
#. type: Plain text |
| 2273 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2274 |
msgid "" |
| 2275 |
"Value of signal sent when read or write becomes possible, or zero for " |
| 2276 |
"traditional B<SIGIO> behavior." |
| 2277 |
msgstr "" |
| 2278 |
|
| 2279 |
#. type: TP |
| 2280 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2281 |
#, no-wrap |
| 2282 |
msgid "B<F_GETPIPE_SZ>" |
| 2283 |
msgstr "" |
| 2284 |
|
| 2285 |
#. type: TQ |
| 2286 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2287 |
#, no-wrap |
| 2288 |
msgid "B<F_SETPIPE_SZ>" |
| 2289 |
msgstr "" |
| 2290 |
|
| 2291 |
#. type: Plain text |
| 2292 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2293 |
msgid "The pipe capacity." |
| 2294 |
msgstr "" |
| 2295 |
|
| 2296 |
#. type: TP |
| 2297 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2298 |
#, no-wrap |
| 2299 |
msgid "B<F_GET_SEALS>" |
| 2300 |
msgstr "" |
| 2301 |
|
| 2302 |
#. type: Plain text |
| 2303 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2304 |
msgid "" |
| 2305 |
"A bit mask identifying the seals that have been set for the inode referred " |
| 2306 |
"to by I<fd>." |
| 2307 |
msgstr "" |
| 2308 |
|
| 2309 |
#. type: TP |
| 2310 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2311 |
#, no-wrap |
| 2312 |
msgid "All other operations" |
| 2313 |
msgstr "" |
| 2314 |
|
| 2315 |
#. type: Plain text |
| 2316 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2317 |
msgid "Zero." |
| 2318 |
msgstr "" |
| 2319 |
|
| 2320 |
#. type: Plain text |
| 2321 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2322 |
msgid "" |
| 2323 |
"I<op> is B<F_SETLK> or B<F_SETLKW> and the file descriptor open mode doesn't " |
| 2324 |
"match with the type of lock requested." |
| 2325 |
msgstr "" |
| 2326 |
|
| 2327 |
#. type: TP |
| 2328 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2329 |
#, no-wrap |
| 2330 |
msgid "B<EBUSY>" |
| 2331 |
msgstr "" |
| 2332 |
|
| 2333 |
#. type: Plain text |
| 2334 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2335 |
msgid "" |
| 2336 |
"I<op> is B<F_SETPIPE_SZ> and the new pipe capacity specified in I<arg> is " |
| 2337 |
"smaller than the amount of buffer space currently used to store data in the " |
| 2338 |
"pipe." |
| 2339 |
msgstr "" |
| 2340 |
|
| 2341 |
#. type: Plain text |
| 2342 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2343 |
msgid "" |
| 2344 |
"I<op> is B<F_ADD_SEALS>, I<arg> includes B<F_SEAL_WRITE>, and there exists a " |
| 2345 |
"writable, shared mapping on the file referred to by I<fd>." |
| 2346 |
msgstr "" |
| 2347 |
|
| 2348 |
#. type: TP |
| 2349 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2350 |
#, no-wrap |
| 2351 |
msgid "B<EDEADLK>" |
| 2352 |
msgstr "" |
| 2353 |
|
| 2354 |
#. type: Plain text |
| 2355 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2356 |
msgid "" |
| 2357 |
"It was detected that the specified B<F_SETLKW> operation would cause a " |
| 2358 |
"deadlock." |
| 2359 |
msgstr "" |
| 2360 |
|
| 2361 |
#. type: TP |
| 2362 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2363 |
#, no-wrap |
| 2364 |
msgid "B<EFAULT>" |
| 2365 |
msgstr "" |
| 2366 |
|
| 2367 |
#. type: Plain text |
| 2368 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2369 |
msgid "I<lock> is outside your accessible address space." |
| 2370 |
msgstr "" |
| 2371 |
|
| 2372 |
#. type: TP |
| 2373 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2374 |
#, no-wrap |
| 2375 |
msgid "B<EINTR>" |
| 2376 |
msgstr "" |
| 2377 |
|
| 2378 |
#. type: Plain text |
| 2379 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2380 |
msgid "" |
| 2381 |
"I<op> is B<F_SETLKW> or B<F_OFD_SETLKW> and the operation was interrupted by " |
| 2382 |
"a signal; see B<signal>(7)." |
| 2383 |
msgstr "" |
| 2384 |
|
| 2385 |
#. type: Plain text |
| 2386 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2387 |
msgid "" |
| 2388 |
"I<op> is B<F_GETLK>, B<F_SETLK>, B<F_OFD_GETLK>, or B<F_OFD_SETLK>, and the " |
| 2389 |
"operation was interrupted by a signal before the lock was checked or " |
| 2390 |
"acquired. Most likely when locking a remote file (e.g., locking over NFS), " |
| 2391 |
"but can sometimes happen locally." |
| 2392 |
msgstr "" |
| 2393 |
|
| 2394 |
#. type: Plain text |
| 2395 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2396 |
msgid "" |
| 2397 |
"I<op> is B<F_ADD_SEALS> and I<arg> includes an unrecognized sealing bit." |
| 2398 |
msgstr "" |
| 2399 |
|
| 2400 |
#. type: Plain text |
| 2401 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2402 |
msgid "" |
| 2403 |
"I<op> is B<F_ADD_SEALS> or B<F_GET_SEALS> and the filesystem containing the " |
| 2404 |
"inode referred to by I<fd> does not support sealing." |
| 2405 |
msgstr "" |
| 2406 |
|
| 2407 |
#. type: Plain text |
| 2408 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2409 |
msgid "" |
| 2410 |
"I<op> is B<F_DUPFD> and I<arg> is negative or is greater than the maximum " |
| 2411 |
"allowable value (see the discussion of B<RLIMIT_NOFILE> in B<getrlimit>(2))." |
| 2412 |
msgstr "" |
| 2413 |
|
| 2414 |
#. type: Plain text |
| 2415 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2416 |
msgid "I<op> is B<F_SETSIG> and I<arg> is not an allowable signal number." |
| 2417 |
msgstr "" |
| 2418 |
|
| 2419 |
#. type: Plain text |
| 2420 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2421 |
msgid "" |
| 2422 |
"I<op> is B<F_OFD_SETLK>, B<F_OFD_SETLKW>, or B<F_OFD_GETLK>, and I<l_pid> " |
| 2423 |
"was not specified as zero." |
| 2424 |
msgstr "" |
| 2425 |
|
| 2426 |
#. type: TP |
| 2427 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2428 |
#, no-wrap |
| 2429 |
msgid "B<EMFILE>" |
| 2430 |
msgstr "" |
| 2431 |
|
| 2432 |
#. type: Plain text |
| 2433 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2434 |
msgid "" |
| 2435 |
"I<op> is B<F_DUPFD> and the per-process limit on the number of open file " |
| 2436 |
"descriptors has been reached." |
| 2437 |
msgstr "" |
| 2438 |
|
| 2439 |
#. type: TP |
| 2440 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2441 |
#, no-wrap |
| 2442 |
msgid "B<ENOLCK>" |
| 2443 |
msgstr "" |
| 2444 |
|
| 2445 |
#. type: Plain text |
| 2446 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2447 |
msgid "" |
| 2448 |
"Too many segment locks open, lock table is full, or a remote locking " |
| 2449 |
"protocol failed (e.g., locking over NFS)." |
| 2450 |
msgstr "" |
| 2451 |
|
| 2452 |
#. type: TP |
| 2453 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2454 |
#, no-wrap |
| 2455 |
msgid "B<ENOTDIR>" |
| 2456 |
msgstr "" |
| 2457 |
|
| 2458 |
#. type: Plain text |
| 2459 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2460 |
msgid "" |
| 2461 |
"B<F_NOTIFY> was specified in I<op>, but I<fd> does not refer to a directory." |
| 2462 |
msgstr "" |
| 2463 |
|
| 2464 |
#. type: TP |
| 2465 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2466 |
#, no-wrap |
| 2467 |
msgid "B<EPERM>" |
| 2468 |
msgstr "" |
| 2469 |
|
| 2470 |
#. type: Plain text |
| 2471 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2472 |
msgid "" |
| 2473 |
"I<op> is B<F_SETPIPE_SZ> and the soft or hard user pipe limit has been " |
| 2474 |
"reached; see B<pipe>(7)." |
| 2475 |
msgstr "" |
| 2476 |
|
| 2477 |
#. type: Plain text |
| 2478 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2479 |
msgid "" |
| 2480 |
"Attempted to clear the B<O_APPEND> flag on a file that has the append-only " |
| 2481 |
"attribute set." |
| 2482 |
msgstr "" |
| 2483 |
|
| 2484 |
#. type: Plain text |
| 2485 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2486 |
msgid "" |
| 2487 |
"I<op> was B<F_ADD_SEALS>, but I<fd> was not open for writing or the current " |
| 2488 |
"set of seals on the file already includes B<F_SEAL_SEAL>." |
| 2489 |
msgstr "" |
| 2490 |
|
| 2491 |
#. type: Plain text |
| 2492 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2493 |
msgid "POSIX.1-2008." |
| 2494 |
msgstr "" |
| 2495 |
|
| 2496 |
#. .P |
| 2497 |
#. SVr4 documents additional EIO, ENOLINK and EOVERFLOW error conditions. |
| 2498 |
#. type: Plain text |
| 2499 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2500 |
msgid "" |
| 2501 |
"B<F_GETOWN_EX>, B<F_SETOWN_EX>, B<F_SETPIPE_SZ>, B<F_GETPIPE_SZ>, " |
| 2502 |
"B<F_GETSIG>, B<F_SETSIG>, B<F_NOTIFY>, B<F_GETLEASE>, and B<F_SETLEASE> are " |
| 2503 |
"Linux-specific. (Define the B<_GNU_SOURCE> macro to obtain these " |
| 2504 |
"definitions.)" |
| 2505 |
msgstr "" |
| 2506 |
|
| 2507 |
#. type: Plain text |
| 2508 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2509 |
msgid "" |
| 2510 |
"B<F_OFD_SETLK>, B<F_OFD_SETLKW>, and B<F_OFD_GETLK> are Linux-specific (and " |
| 2511 |
"one must define B<_GNU_SOURCE> to obtain their definitions), but work is " |
| 2512 |
"being done to have them included in the next version of POSIX.1." |
| 2513 |
msgstr "" |
| 2514 |
|
| 2515 |
#. FIXME . Once glibc adds support, add a note about FTM requirements |
| 2516 |
#. type: Plain text |
| 2517 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2518 |
msgid "B<F_ADD_SEALS> and B<F_GET_SEALS> are Linux-specific." |
| 2519 |
msgstr "" |
| 2520 |
|
| 2521 |
#. type: Plain text |
| 2522 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2523 |
msgid "SVr4, 4.3BSD, POSIX.1-2001." |
| 2524 |
msgstr "" |
| 2525 |
|
| 2526 |
#. type: Plain text |
| 2527 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2528 |
msgid "" |
| 2529 |
"Only the operations B<F_DUPFD>, B<F_GETFD>, B<F_SETFD>, B<F_GETFL>, " |
| 2530 |
"B<F_SETFL>, B<F_GETLK>, B<F_SETLK>, and B<F_SETLKW> are specified in " |
| 2531 |
"POSIX.1-2001." |
| 2532 |
msgstr "" |
| 2533 |
|
| 2534 |
#. .BR _BSD_SOURCE , |
| 2535 |
#. or |
| 2536 |
#. type: Plain text |
| 2537 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2538 |
msgid "" |
| 2539 |
"B<F_GETOWN> and B<F_SETOWN> are specified in POSIX.1-2001. (To get their " |
| 2540 |
"definitions, define either B<_XOPEN_SOURCE> with the value 500 or greater, " |
| 2541 |
"or B<_POSIX_C_SOURCE> with the value 200809L or greater.)" |
| 2542 |
msgstr "" |
| 2543 |
|
| 2544 |
#. type: Plain text |
| 2545 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2546 |
msgid "" |
| 2547 |
"B<F_DUPFD_CLOEXEC> is specified in POSIX.1-2008. (To get this definition, " |
| 2548 |
"define B<_POSIX_C_SOURCE> with the value 200809L or greater, or " |
| 2549 |
"B<_XOPEN_SOURCE> with the value 700 or greater.)" |
| 2550 |
msgstr "" |
| 2551 |
|
| 2552 |
#. type: SH |
| 2553 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2554 |
#, no-wrap |
| 2555 |
msgid "NOTES" |
| 2556 |
msgstr "" |
| 2557 |
|
| 2558 |
#. type: Plain text |
| 2559 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2560 |
msgid "" |
| 2561 |
"The errors returned by B<dup2>(2) are different from those returned by " |
| 2562 |
"B<F_DUPFD>." |
| 2563 |
msgstr "" |
| 2564 |
|
| 2565 |
#. type: SS |
| 2566 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2567 |
#, no-wrap |
| 2568 |
msgid "File locking" |
| 2569 |
msgstr "" |
| 2570 |
|
| 2571 |
#. type: Plain text |
| 2572 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2573 |
msgid "" |
| 2574 |
"The original Linux B<fcntl>() system call was not designed to handle large " |
| 2575 |
"file offsets (in the I<flock> structure). Consequently, an B<fcntl64>() " |
| 2576 |
"system call was added in Linux 2.4. The newer system call employs a " |
| 2577 |
"different structure for file locking, I<flock64>, and corresponding " |
| 2578 |
"operations, B<F_GETLK64>, B<F_SETLK64>, and B<F_SETLKW64>. However, these " |
| 2579 |
"details can be ignored by applications using glibc, whose B<fcntl>() " |
| 2580 |
"wrapper function transparently employs the more recent system call where it " |
| 2581 |
"is available." |
| 2582 |
msgstr "" |
| 2583 |
|
| 2584 |
#. type: SS |
| 2585 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2586 |
#, no-wrap |
| 2587 |
msgid "Record locks" |
| 2588 |
msgstr "" |
| 2589 |
|
| 2590 |
#. type: Plain text |
| 2591 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2592 |
msgid "" |
| 2593 |
"Since Linux 2.0, there is no interaction between the types of lock placed by " |
| 2594 |
"B<flock>(2) and B<fcntl>()." |
| 2595 |
msgstr "" |
| 2596 |
|
| 2597 |
#. e.g., Solaris 8 documents this field in fcntl(2), and Irix 6.5 |
| 2598 |
#. documents it in fcntl(5). mtk, May 2007 |
| 2599 |
#. Also, FreeBSD documents it (Apr 2014). |
| 2600 |
#. type: Plain text |
| 2601 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2602 |
msgid "" |
| 2603 |
"Several systems have more fields in I<struct flock> such as, for example, " |
| 2604 |
"I<l_sysid> (to identify the machine where the lock is held). Clearly, " |
| 2605 |
"I<l_pid> alone is not going to be very useful if the process holding the " |
| 2606 |
"lock may live on a different machine; on Linux, while present on some " |
| 2607 |
"architectures (such as MIPS32), this field is not used." |
| 2608 |
msgstr "" |
| 2609 |
|
| 2610 |
#. type: SS |
| 2611 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2612 |
#, no-wrap |
| 2613 |
msgid "Record locking and NFS" |
| 2614 |
msgstr "" |
| 2615 |
|
| 2616 |
# |
| 2617 |
# |
| 2618 |
# |
| 2619 |
#. Neil Brown: With NFSv3 the failure mode is the reverse. If |
| 2620 |
#. the server loses contact with a client then any lock stays in place |
| 2621 |
#. indefinitely ("why can't I read my mail"... I remember it well). |
| 2622 |
#. Jeff Layton: |
| 2623 |
#. Note that this is not a firm timeout. The server runs a job |
| 2624 |
#. periodically to clean out expired stateful objects, and it's likely |
| 2625 |
#. that there is some time (maybe even up to another whole lease period) |
| 2626 |
#. between when the timeout expires and the job actually runs. If the |
| 2627 |
#. client gets a RENEW in there within that window, its lease will be |
| 2628 |
#. renewed and its state preserved. |
| 2629 |
#. type: Plain text |
| 2630 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2631 |
msgid "" |
| 2632 |
"Before Linux 3.12, if an NFSv4 client loses contact with the server for a " |
| 2633 |
"period of time (defined as more than 90 seconds with no communication), it " |
| 2634 |
"might lose and regain a lock without ever being aware of the fact. (The " |
| 2635 |
"period of time after which contact is assumed lost is known as the NFSv4 " |
| 2636 |
"leasetime. On a Linux NFS server, this can be determined by looking at I</" |
| 2637 |
"proc/fs/nfsd/nfsv4leasetime>, which expresses the period in seconds. The " |
| 2638 |
"default value for this file is 90.) This scenario potentially risks data " |
| 2639 |
"corruption, since another process might acquire a lock in the intervening " |
| 2640 |
"period and perform file I/O." |
| 2641 |
msgstr "" |
| 2642 |
|
| 2643 |
#. commit ef1820f9be27b6ad158f433ab38002ab8131db4d |
| 2644 |
#. commit f6de7a39c181dfb8a2c534661a53c73afb3081cd |
| 2645 |
#. type: Plain text |
| 2646 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2647 |
msgid "" |
| 2648 |
"Since Linux 3.12, if an NFSv4 client loses contact with the server, any I/O " |
| 2649 |
"to the file by a process which \"thinks\" it holds a lock will fail until " |
| 2650 |
"that process closes and reopens the file. A kernel parameter, " |
| 2651 |
"I<nfs.recover_lost_locks>, can be set to 1 to obtain the pre-3.12 behavior, " |
| 2652 |
"whereby the client will attempt to recover lost locks when contact is " |
| 2653 |
"reestablished with the server. Because of the attendant risk of data " |
| 2654 |
"corruption, this parameter defaults to 0 (disabled)." |
| 2655 |
msgstr "" |
| 2656 |
|
| 2657 |
#. type: SH |
| 2658 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2659 |
#, no-wrap |
| 2660 |
msgid "BUGS" |
| 2661 |
msgstr "" |
| 2662 |
|
| 2663 |
#. type: SS |
| 2664 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2665 |
#, no-wrap |
| 2666 |
msgid "F_SETFL" |
| 2667 |
msgstr "" |
| 2668 |
|
| 2669 |
#. FIXME . According to POSIX.1-2001, O_SYNC should also be modifiable |
| 2670 |
#. via fcntl(2), but currently Linux does not permit this |
| 2671 |
#. See http://bugzilla.kernel.org/show_bug.cgi?id=5994 |
| 2672 |
#. type: Plain text |
| 2673 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2674 |
msgid "" |
| 2675 |
"It is not possible to use B<F_SETFL> to change the state of the B<O_DSYNC> " |
| 2676 |
"and B<O_SYNC> flags. Attempts to change the state of these flags are " |
| 2677 |
"silently ignored." |
| 2678 |
msgstr "" |
| 2679 |
|
| 2680 |
#. type: SS |
| 2681 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2682 |
#, no-wrap |
| 2683 |
msgid "F_GETOWN" |
| 2684 |
msgstr "" |
| 2685 |
|
| 2686 |
#. glibc source: sysdeps/unix/sysv/linux/i386/sysdep.h |
| 2687 |
#. mtk, Dec 04: some limited testing on alpha and ia64 seems to |
| 2688 |
#. indicate that ANY negative PGID value will cause F_GETOWN |
| 2689 |
#. to misinterpret the return as an error. Some other architectures |
| 2690 |
#. seem to have the same range check as i386. |
| 2691 |
#. type: Plain text |
| 2692 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2693 |
msgid "" |
| 2694 |
"A limitation of the Linux system call conventions on some architectures " |
| 2695 |
"(notably i386) means that if a (negative) process group ID to be returned " |
| 2696 |
"by B<F_GETOWN> falls in the range -1 to -4095, then the return value is " |
| 2697 |
"wrongly interpreted by glibc as an error in the system call; that is, the " |
| 2698 |
"return value of B<fcntl>() will be -1, and I<errno> will contain the " |
| 2699 |
"(positive) process group ID. The Linux-specific B<F_GETOWN_EX> operation " |
| 2700 |
"avoids this problem. Since glibc 2.11, glibc makes the kernel B<F_GETOWN> " |
| 2701 |
"problem invisible by implementing B<F_GETOWN> using B<F_GETOWN_EX>." |
| 2702 |
msgstr "" |
| 2703 |
|
| 2704 |
#. type: SS |
| 2705 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2706 |
#, no-wrap |
| 2707 |
msgid "F_SETOWN" |
| 2708 |
msgstr "" |
| 2709 |
|
| 2710 |
#. type: Plain text |
| 2711 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2712 |
msgid "" |
| 2713 |
"In Linux 2.4 and earlier, there is bug that can occur when an unprivileged " |
| 2714 |
"process uses B<F_SETOWN> to specify the owner of a socket file descriptor as " |
| 2715 |
"a process (group) other than the caller. In this case, B<fcntl>() can " |
| 2716 |
"return -1 with I<errno> set to B<EPERM>, even when the owner process (group) " |
| 2717 |
"is one that the caller has permission to send signals to. Despite this " |
| 2718 |
"error return, the file descriptor owner is set, and signals will be sent to " |
| 2719 |
"the owner." |
| 2720 |
msgstr "" |
| 2721 |
|
| 2722 |
#. type: SS |
| 2723 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2724 |
#, no-wrap |
| 2725 |
msgid "Deadlock detection" |
| 2726 |
msgstr "" |
| 2727 |
|
| 2728 |
#. type: Plain text |
| 2729 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2730 |
msgid "" |
| 2731 |
"The deadlock-detection algorithm employed by the kernel when dealing with " |
| 2732 |
"B<F_SETLKW> requests can yield both false negatives (failures to detect " |
| 2733 |
"deadlocks, leaving a set of deadlocked processes blocked indefinitely) and " |
| 2734 |
"false positives (B<EDEADLK> errors when there is no deadlock). For example, " |
| 2735 |
"the kernel limits the lock depth of its dependency search to 10 steps, " |
| 2736 |
"meaning that circular deadlock chains that exceed that size will not be " |
| 2737 |
"detected. In addition, the kernel may falsely indicate a deadlock when two " |
| 2738 |
"or more processes created using the B<clone>(2) B<CLONE_FILES> flag place " |
| 2739 |
"locks that appear (to the kernel) to conflict." |
| 2740 |
msgstr "" |
| 2741 |
|
| 2742 |
# |
| 2743 |
#. http://marc.info/?l=linux-kernel&m=119013491707153&w=2 |
| 2744 |
#. Reconfirmed by Jeff Layton |
| 2745 |
#. From: Jeff Layton <jlayton <at> redhat.com> |
| 2746 |
#. Subject: Re: Status of fcntl() mandatory locking |
| 2747 |
#. Newsgroups: gmane.linux.file-systems |
| 2748 |
#. Date: 2014-04-28 10:07:57 GMT |
| 2749 |
#. http://thread.gmane.org/gmane.linux.file-systems/84481/focus=84518 |
| 2750 |
#. type: Plain text |
| 2751 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2752 |
msgid "" |
| 2753 |
"The Linux implementation of mandatory locking is subject to race conditions " |
| 2754 |
"which render it unreliable: a B<write>(2) call that overlaps with a lock " |
| 2755 |
"may modify data after the mandatory lock is acquired; a B<read>(2) call " |
| 2756 |
"that overlaps with a lock may detect changes to data that were made only " |
| 2757 |
"after a write lock was acquired. Similar races exist between mandatory " |
| 2758 |
"locks and B<mmap>(2). It is therefore inadvisable to rely on mandatory " |
| 2759 |
"locking." |
| 2760 |
msgstr "" |
| 2761 |
|
| 2762 |
#. type: Plain text |
| 2763 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2764 |
msgid "" |
| 2765 |
"I<locks.txt>, I<mandatory-locking.txt>, and I<dnotify.txt> in the Linux " |
| 2766 |
"kernel source directory I<Documentation/filesystems/> (on older kernels, " |
| 2767 |
"these files are directly under the I<Documentation/> directory, and " |
| 2768 |
"I<mandatory-locking.txt> is called I<mandatory.txt>)" |
| 2769 |
msgstr "" |
| 2770 |
|
| 2771 |
#. type: TH |
| 2772 |
#: fedora-44 fedora-rawhide |
| 2773 |
#, no-wrap |
| 2774 |
msgid "2024-07-23" |
| 2775 |
msgstr "" |
| 2776 |
|
| 2777 |
#. type: TH |
| 2778 |
#: fedora-44 fedora-rawhide |
| 2779 |
#, no-wrap |
| 2780 |
msgid "Linux man-pages 6.13" |
| 2781 |
msgstr "" |
| 2782 |
|
| 2783 |
#. type: TH |
| 2784 |
#: mageia-cauldron |
| 2785 |
#, no-wrap |
| 2786 |
msgid "Linux man-pages 6.17" |
| 2787 |
msgstr "" |
| 2788 |
|
| 2789 |
#. type: TH |
| 2790 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2791 |
#, no-wrap |
| 2792 |
msgid "Linux man-pages (unreleased)" |
| 2793 |
msgstr "" |