Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.system > #108

Re: per process llseek offset

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!newsfeed.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Rainer Weikusat <rweikusat@mssgmbh.com>
Newsgroups comp.os.linux.development.system
Subject Re: per process llseek offset
Date Mon, 02 May 2011 13:07:47 +0100
Lines 11
Message-ID <87liypjofg.fsf@sapphire.mobileactivedefense.com> (permalink)
References <51ad5eed-fee6-4007-aeba-35be2d9fd80d@m13g2000yqb.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace individual.net MzwXoI3NhrFsM5iZ6h4FHgWuvVKQyFalKtLuyj+4U/fevbDP8=
Cancel-Lock sha1:8JDxAHVGRLY8/J9T8/MES5faZB4= sha1:o9gScFCHZGJBJ5ol/8srolmBwlc=
User-Agent Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)
Xref x330-a1.tempe.blueboxinc.net comp.os.linux.development.system:108

Show key headers only | View raw


"dr.oktopus" <blindwilly@freeonline.zzn.com> writes:
> as you know offset in the file structure is shared amongst father and
> child processes. How can I get a per-process specific offset so that
> a child lseek is not influenced by the same operation done by the
> father process?

Assuming that your inherited file descriptor is stored in a variable
named fd (and the type of file it refers to supports this), opening
the file /proc/self/<fd> (eg /proc/self/3 if fd == 3) results in a
file descriptor referring to the same file but with a newly create
file structure.

Back to comp.os.linux.development.system | Previous | NextPrevious in thread | Find similar


Thread

per process llseek offset "dr.oktopus" <blindwilly@freeonline.zzn.com> - 2011-05-01 22:41 -0700
  Re: per process llseek offset David Schwartz <davids@webmaster.com> - 2011-05-02 03:50 -0700
    Re: per process llseek offset "dr.oktopus" <blindwilly@freeonline.zzn.com> - 2011-05-02 15:39 -0700
      Re: per process llseek offset Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2011-05-02 20:25 -0600
  Re: per process llseek offset Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-05-02 13:07 +0100

csiph-web