On Fri, Oct 12, 2018 at 10:13:13PM +1300, Dave Cameron wrote:
> doas(1) currently states:
> -clip-
> EXIT STATUS
>      The doas utility exits 0 on success, and >0 if an error occurs.  It may
>      fail for one of the following reasons:
> 
>      o   The config file /etc/doas.conf could not be parsed.
>      o   The user attempted to run a command which is not permitted.
>      o   The password was incorrect.
>      o   The specified command was not found or is not executable.
> -clip-
> This is incorrect, doas returns the exit status of command as in:
> -clip-
> $ doas false && echo "was true"
> -no output-
> 
> $ doas true && echo "was true"
> was true
> -clip-
> 
> Manpage amended, to be like nice(1).
> 
> Patch below:
> 

hi.

this is not quite the full story, i think: for options like -C the man
page is correct. so i think your diff should somehow spell out that
generally doas will exit with the status of command, but can itself
exit in such and such a manner if invoked with the options ..

jmc

> Index: usr.bin/doas/doas.1
> ===================================================================
> RCS file: /cvs/src/usr.bin/doas/doas.1,v
> retrieving revision 1.19
> diff -u -r1.19 doas.1
> --- usr.bin/doas/doas.1       4 Sep 2016 15:20:37 -0000       1.19
> +++ usr.bin/doas/doas.1       12 Oct 2018 07:36:29 -0000
> @@ -87,8 +87,8 @@
>  The default is root.
>  .El
>  .Sh EXIT STATUS
> -.Ex -std doas
> -It may fail for one of the following reasons:
> +.Nm
> +may fail for one of the following reasons:
>  .Pp
>  .Bl -bullet -compact
>  .It
> @@ -102,6 +102,11 @@
>  .It
>  The specified command was not found or is not executable.
>  .El
> +.Pp
> +Otherwise, the exit status of
> +.Nm
> +shall be that of
> +.Ar command .
>  .Sh SEE ALSO
>  .Xr su 1 ,
>  .Xr doas.conf 5
> 
> 
> 
> -- 
> 

Reply via email to