1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
|
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2023-08-27 16:57+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#. type: TH
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "FLOCK"
msgstr ""
#. type: TH
#: debian-bookworm
#, no-wrap
msgid "2022-05-11"
msgstr ""
#. type: TH
#: debian-bookworm
#, no-wrap
msgid "util-linux 2.38.1"
msgstr ""
#. type: TH
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "User Commands"
msgstr ""
#. type: SH
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "NAME"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "flock - manage locks from shell scripts"
msgstr ""
#. type: SH
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "SYNOPSIS"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "B<flock> [options] I<file>|I<directory> I<command> [I<arguments>]"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "B<flock> [options] I<file>|I<directory> B<-c> I<command>"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "B<flock> [options] I<number>"
msgstr ""
#. type: SH
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "DESCRIPTION"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"This utility manages B<flock>(2) locks from within shell scripts or from the "
"command line."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"The first and second of the above forms wrap the lock around the execution "
"of a I<command>, in a manner similar to B<su>(1) or B<newgrp>(1). They lock "
"a specified I<file> or I<directory>, which is created (assuming appropriate "
"permissions) if it does not already exist. By default, if the lock cannot be "
"immediately acquired, B<flock> waits until the lock is available."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"The third form uses an open file by its file descriptor I<number>. See the "
"examples below for how that can be used."
msgstr ""
#. type: SH
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "OPTIONS"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "B<-c>, B<--command> I<command>"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "Pass a single I<command>, without arguments, to the shell with B<-c>."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "B<-E>, B<--conflict-exit-code> I<number>"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"The exit status used when the B<-n> option is in use, and the conflicting "
"lock exists, or the B<-w> option is in use, and the timeout is reached. The "
"default value is B<1>. The I<number> has to be in the range of 0 to 255."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "B<-F>, B<--no-fork>"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"Do not fork before executing I<command>. Upon execution the flock process is "
"replaced by I<command> which continues to hold the lock. This option is "
"incompatible with B<--close> as there would otherwise be nothing left to "
"hold the lock."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "B<-e>, B<-x>, B<--exclusive>"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"Obtain an exclusive lock, sometimes called a write lock. This is the default."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "B<-n>, B<--nb>, B<--nonblock>"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"Fail rather than wait if the lock cannot be immediately acquired. See the B<-"
"E> option for the exit status used."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "B<-o>, B<--close>"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"Close the file descriptor on which the lock is held before executing "
"I<command>. This is useful if I<command> spawns a child process which should "
"not be holding the lock."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "B<-s>, B<--shared>"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "Obtain a shared lock, sometimes called a read lock."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "B<-u>, B<--unlock>"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"Drop a lock. This is usually not required, since a lock is automatically "
"dropped when the file is closed. However, it may be required in special "
"cases, for example if the enclosed command group may have forked a "
"background process which should not be holding the lock."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "B<-w>, B<--wait>, B<--timeout> I<seconds>"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"Fail if the lock cannot be acquired within I<seconds>. Decimal fractional "
"values are allowed. See the B<-E> option for the exit status used. The zero "
"number of I<seconds> is interpreted as B<--nonblock>."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "B<--verbose>"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"Report how long it took to acquire the lock, or why the lock could not be "
"obtained."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "B<-h>, B<--help>"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "Display help text and exit."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "B<-V>, B<--version>"
msgstr ""
#. type: Plain text
#: debian-bookworm
msgid "Print version and exit."
msgstr ""
#. type: SH
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "EXIT STATUS"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"The command uses E<lt>sysexits.hE<gt> exit status values for everything, "
"except when using either of the options B<-n> or B<-w> which report a "
"failure to acquire the lock with an exit status given by the B<-E> option, "
"or 1 by default. The exit status given by B<-E> has to be in the range of 0 "
"to 255."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"When using the I<command> variant, and executing the child worked, then the "
"exit status is that of the child command."
msgstr ""
#. type: SH
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "NOTES"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "B<flock> does not detect deadlock. See B<flock>(2) for details."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"Some file systems (e. g. NFS and CIFS) have a limited implementation of "
"B<flock>(2) and flock may always fail. For details see B<flock>(2), "
"B<nfs>(5) and B<mount.cifs>(8). Depending on mount options, flock can always "
"fail there."
msgstr ""
#. type: SH
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "EXAMPLES"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "Note that \"shellE<gt> \" in examples is a command line prompt."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"shell1E<gt> flock /tmp -c cat; shell2E<gt> flock -w .007 /tmp -c echo; /bin/"
"echo $?"
msgstr ""
#. type: Plain text
#: debian-bookworm
msgid ""
"Set exclusive lock to directory I</tmp> and the second command will fail."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"shell1E<gt> flock -s /tmp -c cat; shell2E<gt> flock -s -w .007 /tmp -c "
"echo; /bin/echo $?"
msgstr ""
#. type: Plain text
#: debian-bookworm
msgid ""
"Set shared lock to directory I</tmp> and the second command will not fail. "
"Notice that attempting to get exclusive lock with second command would fail."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "shellE<gt> flock -x local-lock-file echo \\(aqa b c\\(aq"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"Grab the exclusive lock \"local-lock-file\" before running echo with \\(aqa "
"b c\\(aq."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"(; flock -n 9 || exit 1; # ... commands executed under lock ...; ) 9E<gt>/"
"var/lock/mylockfile"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"The form is convenient inside shell scripts. The mode used to open the file "
"doesn\\(cqt matter to B<flock>; using I<E<gt>> or I<E<gt>E<gt>> allows the "
"lockfile to be created if it does not already exist, however, write "
"permission is required. Using I<E<lt>> requires that the file already exists "
"but only read permission is required."
msgstr ""
#. type: Plain text
#: debian-bookworm
msgid ""
"[ \"${FLOCKER}\" != \"$0\" ] && exec env FLOCKER=\"$0\" flock -en \"$0\" "
"\"$0\" \"$@\" || :"
msgstr ""
#. type: Plain text
#: debian-bookworm
msgid ""
"This is useful boilerplate code for shell scripts. Put it at the top of the "
"shell script you want to lock and it\\(cqll automatically lock itself on the "
"first run. If the environment variable B<$FLOCKER> is not set to the shell "
"script that is being run, then execute B<flock> and grab an exclusive non-"
"blocking lock (using the script itself as the lock file) before re-execing "
"itself with the right arguments. It also sets the B<FLOCKER> environment "
"variable to the right value so it doesn\\(cqt run again."
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "shellE<gt> exec 4E<lt>E<gt>/var/lock/mylockfile; shellE<gt> flock -n 4"
msgstr ""
#. type: Plain text
#: debian-bookworm
msgid ""
"This form is convenient for locking a file without spawning a subprocess. "
"The shell opens the lock file for reading and writing as file descriptor 4, "
"then B<flock> is used to lock the descriptor."
msgstr ""
#. type: SH
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "AUTHORS"
msgstr ""
#. type: SH
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "COPYRIGHT"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"Copyright © 2003-2006 H. Peter Anvin. This is free software; see the source "
"for copying conditions. There is NO warranty; not even for MERCHANTABILITY "
"or FITNESS FOR A PARTICULAR PURPOSE."
msgstr ""
#. type: SH
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "SEE ALSO"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "B<flock>(2)"
msgstr ""
#. type: SH
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "REPORTING BUGS"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "For bug reports, use the issue tracker at"
msgstr ""
#. type: SH
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "AVAILABILITY"
msgstr ""
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"The B<flock> command is part of the util-linux package which can be "
"downloaded from"
msgstr ""
#. type: TH
#: opensuse-leap-15-6
#, no-wrap
msgid "2022-02-14"
msgstr ""
#. type: TH
#: opensuse-leap-15-6
#, no-wrap
msgid "util-linux 2.37.4"
msgstr ""
#. type: Plain text
#: opensuse-leap-15-6
msgid "Display version information and exit."
msgstr ""
#. type: Plain text
#: opensuse-leap-15-6
msgid "Set exclusive lock to directory /tmp and the second command will fail."
msgstr ""
#. type: Plain text
#: opensuse-leap-15-6
msgid ""
"Set shared lock to directory /tmp and the second command will not fail. "
"Notice that attempting to get exclusive lock with second command would fail."
msgstr ""
#. type: Plain text
#: opensuse-leap-15-6
msgid "[ ${FLOCKER} != $0 ] && exec env FLOCKER=\"$0 flock -en $0 $0 $@ ||"
msgstr ""
#. type: Plain text
#: opensuse-leap-15-6
msgid ""
"This is useful boilerplate code for shell scripts. Put it at the top of the "
"shell script you want to lock and it\\(cqll automatically lock itself on the "
"first run. If the env var B<$FLOCKER> is not set to the shell script that is "
"being run, then execute B<flock> and grab an exclusive non-blocking lock "
"(using the script itself as the lock file) before re-execing itself with the "
"right arguments. It also sets the FLOCKER env var to the right value so it "
"doesn\\(cqt run again."
msgstr ""
#. type: Plain text
#: opensuse-leap-15-6
msgid ""
"This form is convenient for locking a file without spawning a subprocess. "
"The shell opens the lock file for reading and writing as file descriptor 4, "
"then flock is used to lock the descriptor."
msgstr ""
|