fwcontrol -r missing a close() call

Dan Nelson dnelson at allantgroup.com
Tue Aug 19 10:12:03 PDT 2003


In the last episode (Aug 19), Andre Guibert de Bruet said:
> open("/dev/fw0.0",0x2,01001132500)               = 3 (0x3)
> ioctl(3,FW_IBUSRST,0xbfbff400)                   = 0 (0x0)
> exit(0x0)
> process exit, rval = 0
> 
> We're not closing fd #3 before exiting the process. This is also the case
> with 4.8-STABLE.
> 
> Semantics? Nit-picking? Both? :)

Why bother closing a fd when exit() will do it for you?  You don't
close stdout when you're done with it :)

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-current mailing list