Hi Ted,

Ted Unangst wrote on Fri, Jan 31, 2020 at 05:33:05AM -0500:

> Noticed this in wait.2, though I imagine other occurences abound.
> 
> I believe non-null is clearer when refering to a pointer than non-zero, which
> is a bit 80s, and less likely to be mistaken for the value pointed to. This
> same page also refers to non-zero values, fwiw.

Makes sense to.

In general, we use .Dv NULL to refer to null pointers, so i'd prefer

  area, if
  .Pf non- Dv NULL ,
  is filled in with termination information about the

or

  area, unless it is
  .Dv NULL ,
  is filled in with termination information about the

  Unless
  .Fa rusage
  is
  .Dv NULL ,
  a summary of the resources used by the terminated

But i don't object to your version either if you strongly
resent using .Dv NULL .

Yours,
  Ingo


> Index: wait.2
> ===================================================================
> RCS file: /home/cvs/src/lib/libc/sys/wait.2,v
> retrieving revision 1.30
> diff -u -p -r1.30 wait.2
> --- wait.2    1 May 2017 00:08:31 -0000       1.30
> +++ wait.2    31 Jan 2020 10:28:42 -0000
> @@ -70,7 +70,7 @@ On return from a successful
>  .Fn wait
>  call, the
>  .Fa status
> -area, if non-zero, is filled in with termination information about the
> +area, if non-null, is filled in with termination information about the
>  process that exited (see below).
>  .Pp
>  The
> @@ -137,7 +137,7 @@ signal also have their status reported.
>  .Pp
>  If
>  .Fa rusage
> -is non-zero, a summary of the resources used by the terminated
> +is non-null, a summary of the resources used by the terminated
>  process and all its
>  children is returned (this information is currently not available
>  for stopped processes).

Reply via email to