Subject: Re: Allow pkill races without aborting?
To: Roland Illig <rillig@NetBSD.org>
From: Dave Sainty <dave@dtsp.co.nz>
List: tech-userlevel
Date: 07/17/2005 23:37:57
Roland Illig writes:

> > +	if (kill(kp->p_pid, signum) == -1) {
> > +		if (errno == ESRCH)
> > +			/*
> > +			 * The process disappeared between us matching
> > +			 * it and us signalling it.  Return 0 to
> > +			 * indicate that the process should not be
> > +			 * considered a match.
> > +			 */
> > +			return 0;
> 
> Could you please but braces around the comment and the return? (twice)

Style says "Don't add braces that aren't necessary except in cases
where there are ambiguity or readability issues.".  It's probably open
to interpretation whether this case is an ambiguity or readability
issue :)

What does the prior art say?

Cheers,

Dave