| #
679f6194
|
| 24-Jun-2025 |
Kyle Evans <kevans@FreeBSD.org> |
lockf: add a -T option to terminate the child upon early abort
This is useful to avoid having the command running twice in the face of the admin terminating the process. Notably, if the -p option i
lockf: add a -T option to terminate the child upon early abort
This is useful to avoid having the command running twice in the face of the admin terminating the process. Notably, if the -p option is not in use (or can't be used, e.g., because we can't open the file for writing) then this provides a nice alternative where one simply needs to send a SIGTERM to the lockf(1) process associated with the lock file to clean it all up.
Reviewed by: des Differential Revision: https://reviews.freebsd.org/D51025
show more ...
|
| #
df268d4b
|
| 24-Jun-2025 |
Kyle Evans <kevans@FreeBSD.org> |
lockf: add a -p mode to write the child's pid
If we're going to hold the lock, it can be useful to scribble down the pid that we spawned off to quickly associate the lock back to the process that's
lockf: add a -p mode to write the child's pid
If we're going to hold the lock, it can be useful to scribble down the pid that we spawned off to quickly associate the lock back to the process that's keeping it open.
Reviewed by: allanjude (previous version), des Differential Revision: https://reviews.freebsd.org/D51014
show more ...
|
| #
09a7fe0a
|
| 22-Nov-2023 |
Kyle Evans <kevans@FreeBSD.org> |
lockf: allow locking file descriptors
This is most useful inside a shell script, allowing one to lock just portions of a script rather than having to wrap the entire script in a lock.
PR: 262738 R
lockf: allow locking file descriptors
This is most useful inside a shell script, allowing one to lock just portions of a script rather than having to wrap the entire script in a lock.
PR: 262738 Reviewed by: 0mp, allanjude (both previous versions) Co-authored-by: Daniel O'Connor <darius@dons.net.au> Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D42718
show more ...
|
| #
fa9896e0
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
|
| #
e2515283
|
| 27-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
| #
bd4fcf75
|
| 26-Aug-2020 |
Colin Percival <cperciva@FreeBSD.org> |
Remove whitespace which accidentaly snuck into r364831.
|
| #
437bab48
|
| 26-Aug-2020 |
Colin Percival <cperciva@FreeBSD.org> |
Add -w option to lockf(1).
By default, lockf(1) opens its lock file O_RDONLY|O_EXLOCK. On NFS, if the file already exists, this is split into opening the file read-only and then requesting an exclu
Add -w option to lockf(1).
By default, lockf(1) opens its lock file O_RDONLY|O_EXLOCK. On NFS, if the file already exists, this is split into opening the file read-only and then requesting an exclusive lock -- and the second step fails because NFS does not permit exclusive locking on files which are opened read-only.
The new -w option changes the open flags to O_WRONLY|O_EXLOCK, allowing it to work on NFS -- at the cost of not working if the file cannot be opened for writing.
(Whether the traditional BSD behaviour of allowing exclusive locks to be obtained on a file which cannot be opened for writing is a good idea is perhaps questionable since it may allow less-privileged users to perform a local denial of service; however this behaviour has been present for a long time and changing it now seems like it would cause problems.)
Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D26005
show more ...
|
| #
15597d5d
|
| 18-Jun-2020 |
Fernando Apesteguía <fernape@FreeBSD.org> |
lockf(1): Add EXAMPLES section
* Add pretty small EXAMPLES section * While here, fix a warning in line 98 (new sentence in new line)
Approved by: bcr@ Differential Revision: https://reviews.freeb
lockf(1): Add EXAMPLES section
* Add pretty small EXAMPLES section * While here, fix a warning in line 98 (new sentence in new line)
Approved by: bcr@ Differential Revision: https://reviews.freebsd.org/D25205
show more ...
|
| #
679f6194
|
| 24-Jun-2025 |
Kyle Evans <kevans@FreeBSD.org> |
lockf: add a -T option to terminate the child upon early abort
This is useful to avoid having the command running twice in the face of the admin terminating the process. Notably, if the -p option i
lockf: add a -T option to terminate the child upon early abort
This is useful to avoid having the command running twice in the face of the admin terminating the process. Notably, if the -p option is not in use (or can't be used, e.g., because we can't open the file for writing) then this provides a nice alternative where one simply needs to send a SIGTERM to the lockf(1) process associated with the lock file to clean it all up.
Reviewed by: des Differential Revision: https://reviews.freebsd.org/D51025
show more ...
|
| #
df268d4b
|
| 24-Jun-2025 |
Kyle Evans <kevans@FreeBSD.org> |
lockf: add a -p mode to write the child's pid
If we're going to hold the lock, it can be useful to scribble down the pid that we spawned off to quickly associate the lock back to the process that's
lockf: add a -p mode to write the child's pid
If we're going to hold the lock, it can be useful to scribble down the pid that we spawned off to quickly associate the lock back to the process that's keeping it open.
Reviewed by: allanjude (previous version), des Differential Revision: https://reviews.freebsd.org/D51014
show more ...
|
| #
09a7fe0a
|
| 22-Nov-2023 |
Kyle Evans <kevans@FreeBSD.org> |
lockf: allow locking file descriptors
This is most useful inside a shell script, allowing one to lock just portions of a script rather than having to wrap the entire script in a lock.
PR: 262738 R
lockf: allow locking file descriptors
This is most useful inside a shell script, allowing one to lock just portions of a script rather than having to wrap the entire script in a lock.
PR: 262738 Reviewed by: 0mp, allanjude (both previous versions) Co-authored-by: Daniel O'Connor <darius@dons.net.au> Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D42718
show more ...
|
| #
fa9896e0
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
|
| #
e2515283
|
| 27-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
| #
bd4fcf75
|
| 26-Aug-2020 |
Colin Percival <cperciva@FreeBSD.org> |
Remove whitespace which accidentaly snuck into r364831.
|
| #
437bab48
|
| 26-Aug-2020 |
Colin Percival <cperciva@FreeBSD.org> |
Add -w option to lockf(1).
By default, lockf(1) opens its lock file O_RDONLY|O_EXLOCK. On NFS, if the file already exists, this is split into opening the file read-only and then requesting an exclu
Add -w option to lockf(1).
By default, lockf(1) opens its lock file O_RDONLY|O_EXLOCK. On NFS, if the file already exists, this is split into opening the file read-only and then requesting an exclusive lock -- and the second step fails because NFS does not permit exclusive locking on files which are opened read-only.
The new -w option changes the open flags to O_WRONLY|O_EXLOCK, allowing it to work on NFS -- at the cost of not working if the file cannot be opened for writing.
(Whether the traditional BSD behaviour of allowing exclusive locks to be obtained on a file which cannot be opened for writing is a good idea is perhaps questionable since it may allow less-privileged users to perform a local denial of service; however this behaviour has been present for a long time and changing it now seems like it would cause problems.)
Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D26005
show more ...
|
| #
15597d5d
|
| 18-Jun-2020 |
Fernando Apesteguía <fernape@FreeBSD.org> |
lockf(1): Add EXAMPLES section
* Add pretty small EXAMPLES section * While here, fix a warning in line 98 (new sentence in new line)
Approved by: bcr@ Differential Revision: https://reviews.freeb
lockf(1): Add EXAMPLES section
* Add pretty small EXAMPLES section * While here, fix a warning in line 98 (new sentence in new line)
Approved by: bcr@ Differential Revision: https://reviews.freebsd.org/D25205
show more ...
|
| #
416ba5c7
|
| 22-Jun-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Catch up with HEAD (r280229-r284686).
|
| #
98e0ffae
|
| 27-May-2015 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge sync of head
|
| #
7757a1b4
|
| 03-May-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
| #
7263c8c0
|
| 22-Apr-2015 |
Glen Barber <gjb@FreeBSD.org> |
MFH: r280643-r281852
Sponsored by: The FreeBSD Foundation
|
| #
bef6922b
|
| 06-Apr-2015 |
Mark Johnston <markj@FreeBSD.org> |
lockf(1): add a reference to lockf(3).
Submitted by: Conrad Meyer MFC after: 1 week
|
| #
246e7a2b
|
| 02-Sep-2014 |
Neel Natu <neel@FreeBSD.org> |
IFC @r269962
Submitted by: Anish Gupta (akgupt3@gmail.com)
|
| #
ee7b0571
|
| 19-Aug-2014 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge head from 7/28
|
| #
1b833d53
|
| 13-Aug-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Sync to HEAD@r269943.
|
| #
2b7af31c
|
| 23-Jun-2014 |
Baptiste Daroussin <bapt@FreeBSD.org> |
use .Mt to mark up email addresses consistently (part3)
PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de>
|