Page MenuHomeFreeBSD

Do not recommend sleeping when using vipw(8) non-interactively
Needs ReviewPublic

Authored by 0mp on Jun 18 2020, 1:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 27, 12:32 PM
Unknown Object (File)
Thu, Mar 26, 4:32 PM
Unknown Object (File)
Fri, Mar 20, 4:38 AM
Unknown Object (File)
Wed, Mar 18, 10:32 AM
Unknown Object (File)
Sun, Mar 15, 12:31 PM
Unknown Object (File)
Feb 13 2026, 10:38 PM
Unknown Object (File)
Feb 4 2026, 12:01 PM
Unknown Object (File)
Dec 9 2025, 5:55 AM

Details

Reviewers
None
Group Reviewers
manpages
Contributor Reviews (src)
Summary
vipw.8: Do not recommend sleeping when using vipw(8) non-interactively

Before r231383, pw_edit(3) was unable to detect file changes reliably
without an explicit waiting via sleep(1) for example.  Since then,
however, pw_edit(3) has a nanosecond precision of detecting file
modifications, so calling "sleep 1" when using a non-interactive editor
with vipw(8) is no longer necessary.

Keep the note about the modification time, as it might still be useful
to users.

I am not exactly sure if this change is correct. A nanosecond precision is probably good enough for most users.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 71658
Build 68541: arc lint + arc unit

Event Timeline

0mp requested review of this revision.Jun 18 2020, 1:58 PM

I would move the "The mechanism for checking for password file modifications requires that the modification time of the password file changes." part under a NOTES section and then remove the BUGS section.

Is this one still active?

In D25338#675153, @bcr wrote:

Is this one still active?

As long as I can get someone to review and accept the change :)

I would move the "The mechanism for checking for password file modifications requires that the modification time of the password file changes." part under a NOTES section and then remove the BUGS section.

mdoc(7) does not have a NOTES section in its standard. It should live in the BUGS section.

Is the change good otherwise?

In D25338#770884, @0mp wrote:

I would move the "The mechanism for checking for password file modifications requires that the modification time of the password file changes." part under a NOTES section and then remove the BUGS section.

mdoc(7) does not have a NOTES section in its standard. It should live in the BUGS section.

Is the change good otherwise?

I'm OK with the change for as long as it keeps the piece of information that I mentioned. I'd prefer under an IMPLEMENTATION NOTES or CAVEATS section, but if not there, let it be BUGS.

In D25338#770884, @0mp wrote:
In D25338#675153, @bcr wrote:

! In D25338#559975, @pstef wrote:

I would move the "The mechanism for checking for password file modifications requires that the modification time of the password file changes." part under a NOTES section and then remove the BUGS section.

That should be "requires that ... change" (no "s" suffix). See https://en.wikipedia.org/wiki/English_subjunctive#Finiteness.

  • bring back the note about time