[lkml]   [2004]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Linux kernel file offset pointer races
On Samstag, 7. August 2004 15:18, 
> On Sat, Aug 07, 2004 at 02:38:12PM +0200, Amon Ott wrote:
> > Would it not be useful to have per-process or per-thread offsets? Do
> > parallel processes really need to share the offset?
> >
> > E.g., the struct file could (optionally) be copied on fork with
> > copy-on-write to avoid extra memory consumption.
> (cat a; cat b) > /tmp/foo

Right, the process running (...) would not know what offset to give "cat b"
as a start, because it cannot see "cat a"'s final offset. It could seek to
the end of /tmp/foo before starting "cat b", but this requirement would
break existing shells. Bad luck.

As there are probably more examples why it does not work, there will
probably have to be a macro for all offset changes, which checks for

-- - GnuPG: 2048g/5DEAAA30 2002-10-22
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2005-03-22 14:05    [W:0.035 / U:1.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site