Re: Potential issue in sparse_file()

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

 



On Fri, Jun 16, 2017 at 5:33 AM, Dibyendu Majumdar
<mobile@xxxxxxxxxxxxxxx> wrote:
> Hi,
>
> I noticed that sparse_file() closes the file descriptor even when it
> is 0. Is this the intended behavior?

I don't see a problem with it. The tokenize_stream() will keep reading
the file descriptor until it hit EOF.

If the stander input (file descriptor 0) already hit EOF, there is not much
you can read from it any way. You might just as well close it.

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



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux