netdev
[Top] [All Lists]

Re: Wrong UIDs reported in /proc/net/tcp

To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Subject: Re: Wrong UIDs reported in /proc/net/tcp
From: David Stevens <dlstevens@xxxxxxxxxx>
Date: Thu, 18 Nov 2004 14:16:33 -0800
Cc: "Chad N. Tindel" <chad@xxxxxxxxxx>, linux-net@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx, netdev-bounce@xxxxxxxxxxx, Stephen Hemminger <shemminger@xxxxxxxx>
In-reply-to: <20041118220719.GA9890@gondor.apana.org.au>
Sender: netdev-bounce@xxxxxxxxxxx
Isn't the read itself atomic?

Assuming so, another solution would be to stat/fstat the file, add some to 
it to account
for growth, allocate a buffer that big and read the whole thing in one 
shot. Then the
results should be self-consistent.

                                                +-DLS


<Prev in Thread] Current Thread [Next in Thread>