Re: Prevent a process from opening a file more than once

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

First, no need to send HTML parts.

On Mit, 2011-09-28 at 07:41 +0200, Michael Blizek wrote:
[...]
> You could create something like this:
[...]

Yes, that's the solution.

But keep in mind that userspace also have the dup() and dup2() sys-call
which duplicate the file descriptor (within the same process) and there
is AFAIK no way to even detect that - let alone disallow it.
And after a fork(), it's more or less the same (except that the open
file descriptors belong to different processes ....).

Generally, I wonder why that is even necessary.

	Bernd
-- 
Bernd Petrovitsch                  Email : bernd@xxxxxxxxxxxxxxxxxxx
                     LUGA : http://www.luga.at


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux