Re: /usr/lib/apt/methods/http - close(-1)
On Fri, 29 Jan 1999, Scott K. Ellis wrote:
>On Fri, 29 Jan 1999, Russell Coker wrote:
>
>> What is a close(-1) supposed to do? The http program does one and I'm curious
>> as to why...
>
>IIRC, close(-1) closes all open file handles. I'm not certain exactly
>wher this is documented though.
It really doesn't seem to be doing so on Linux 2.2.0. Surely if it was closing
file descriptors then it would return 0... Here's a grep of my output from the
stracing of dselect I did earlier:
/tmp/out.24701:close(-1) = -1 EBADF (Bad file descriptor)
/tmp/out.24702:close(-1) = -1 EBADF (Bad file descriptor)
/tmp/out.24702:close(-1) = -1 EBADF (Bad file descriptor)
/tmp/out.24702:close(-1) = -1 EBADF (Bad file descriptor)
/tmp/out.24703:close(-1) = -1 EBADF (Bad file descriptor)
/tmp/out.24704:close(-1) = -1 EBADF (Bad file descriptor)
--
I am in London and would like to meet any Linux users here.
I plan to work in London for 6 months and then I might move to some other
place where the pay is good.
Reply to: