https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=40572

fernando.apesteg...@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fernando.apesteguia@gmail.c
                   |                            |om

--- Comment #2 from fernando.apesteg...@gmail.com ---
Created attachment 190815
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=190815&action=edit
patch to lib/libutil/pw_util.c

With this patch, we have a nicer output. The point is to return 0 (file not
modified) if the processes exited abnormally. I think it is pretty much the
correct behavior. With this patch, on -CURRENT, this is the output:

# export EDITOR=false
# vipw
'false' failed with error code 1: Operation not permitted
vipw: no changes made

# export EDITOR=/home/test/idontexist
# vipw
'/home/test/idontexist' failed with error code 2: No such file or directory
vipw: no changes made

# export EDITOR=vim
# vipw
(I write the file)
vipw: password list updated

# vipw
(I do not write the file)
vipw: no changes made

The patch can me MFC'd to 11 cleanly.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to