Re: [PATCH] rpc.gssd: don't call poll() twice a second

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 29, 2012 at 07:09:30PM -0400, Steve Dickson wrote:
> 
> 
> On 07/29/2012 01:48 PM, J. Bruce Fields wrote:
> > On Fri, Jul 27, 2012 at 07:08:53PM -0400, Jim Rees wrote:
> >> J. Bruce Fields wrote:
> >>
> >>   +	if (1 != write(pipefd[1], "!", 1))
> >>   +		printerr(2, "weird; maybe an interrupt?");
> >>
> >> Use Yoda conditions must we?
> > 
> > Yeah, yeah.  How about:
> > 
> > 	 static void something_changed(void)
> > 	 {
> > 	-	if (1 != write(pipefd[1], "!", 1))
> > 	-		printerr(2, "weird; maybe an interrupt?");
> > 	+	if (write(pipefd[1], "!", 1) != 1)
> > 	+		printerr(0, "%s writing to pipe", strerror(errno));
> > 	 }
> >  
> > ?
> Better... IMHO..  but what's going to mean when we see that in some log?

Beats me.

--b.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux