lkml.org 
[lkml]   [1996]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: CLONE_FILES problem.
From
Date
Hi,

Alan Cox wrote:
>> structures are concerned. Something should probably be done with
>> blocking accesses to files, i.e. if one thread is read()ing from a file
>> descriptor which another wants to close, the first should get a signal or
>> something.
>
>Bumping the count as suggested elsewhere is a much more elegant, scalable
>and self locking answer.
>
Depends on what you want to do. For files at least, I'd want the file
descriptor to be closed, period. This means that if thread A reads from the
modem and thread B wants to close things down, thread B close()s the file
and A notices this somehow (EOF, signal, whatever).

Memory mappings can of course use counters, but you'd have to add the
appropriate unlock calls to every procedure which uses verify_area.
This is probably something that should have been done from the beginning...

--
Matrix Technicians do it in relays
--
Matthias Urlichs \ noris network GmbH / Xlink-POP Nürnberg
Schleiermacherstraße 12 \ Linux+Internet / EMail: urlichs@noris.de
90491 Nürnberg (Germany) \ Consulting+Programming+Networking+etc'ing
PGP: 1024/4F578875 1B 89 E2 1C 43 EA 80 44 15 D2 29 CF C6 C7 E0 DE
Click <A HREF="http://info.noris.de/~smurf/finger">here</A>. 42

\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.048 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site