Re: [PATCH 2/2] dvbv5-daemon: 0 is a valid fd

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

 



On 16/11/2017 12:25, Mauro Carvalho Chehab wrote:
> Em Wed, 15 Nov 2017 12:33:36 +0100
> Rafaël Carré <funman@xxxxxxxxxxxx> escreveu:
> 
>> ---
>>  utils/dvb/dvbv5-daemon.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/utils/dvb/dvbv5-daemon.c b/utils/dvb/dvbv5-daemon.c
>> index 58485ac6..711694e0 100644
>> --- a/utils/dvb/dvbv5-daemon.c
>> +++ b/utils/dvb/dvbv5-daemon.c
>> @@ -570,7 +570,7 @@ void dvb_remote_log(void *priv, int level, const char *fmt, ...)
>>  
>>  	va_end(ap);
>>  
>> -	if (fd > 0)
>> +	if (fd >= 0)
>>  		send_data(fd, "%i%s%i%s", 0, "log", level, buf);
>>  	else
>>  		local_log(level, buf);

Signed-off-by: Rafaël Carré <funman@xxxxxxxxxxxx>

> 
> Patch looks OK. Just need a description explaining why we
> need to consider fd == 0 and a SOB.

Sorry, I am not used to do sign-off, will try to remember.

fd == 0 can happen if the application closes stdin/out/err then opens a
new fd.

Should I put this in the commit log?

> Thanks,
> Mauro
> 




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux