[mythtv] [patch] fd 0 is OK, some cleanups

J. Donavan Stanley jdonavan at jdonavan.net
Fri Oct 22 09:32:22 UTC 2004


Christopher Pascoe wrote:

>A number of places throughout the code presume that a filedescriptor of 0
>is invalid.  We're lucky in that this doesn't cause any problems at the
>present time, as fd 0 gets allocated to something that doesn't care, but
>one may not always be so lucky - better to be safe.
>
>The attached patch corrects codepaths which treat 0 as an invalid fd, as
>well as putting some close()s in error paths, catching a case where a loop
>could terminate incorrectly even if a (deferred) open was successful, and
>closing an extra copy of the log filedescriptor that we have open.
>
>  
>


Committed to CVS.  Thanks!


More information about the mythtv-dev mailing list