Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.development.system > #107
| From | David Schwartz <davids@webmaster.com> |
|---|---|
| Newsgroups | comp.os.linux.development.system |
| Subject | Re: per process llseek offset |
| Date | 2011-05-02 03:50 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <7eccb3fd-6a26-402d-8244-dd29ef175e8d@34g2000pru.googlegroups.com> (permalink) |
| References | <51ad5eed-fee6-4007-aeba-35be2d9fd80d@m13g2000yqb.googlegroups.com> |
On May 1, 10:41 pm, "dr.oktopus" <blindwi...@freeonline.zzn.com> wrote: > Hi, > 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? A > possibility > is build a list of pid and associate offset and, for every read or > write operation, look for the > pid of the process and get appropriate offset. This is the method used > in Linux Device > Drivers book (the example is tty-local specific, but could be adapted > for processes). > I would like to know if other methods exists. > Thanks, > willy It's not clear what the "I" is that you're talking about. Are you talking about what a device driver can do? It can trivially keep a table of PIDs and offsets. Are you talking about what a process can do to keep its own offset? Or hwat? Personally, I would strongly urge you to keep the offsets shared. That's what processes will expect, and I can't imagine why you would want to behave differently from the way everything else behaves. DS
Back to comp.os.linux.development.system | Previous | Next — Previous in thread | Next in thread | Find similar
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