How ? One file <----> One file descriptor

How ? One file <----> One file descriptor

Post by Francisco Marti » Sat, 28 Oct 1995 04:00:00



 Hi,

 Can I set up one file in order to have only one fd ?

 I want to do that only one process can read it.

 Thanks in advance

 
 
 

How ? One file <----> One file descriptor

Post by Arny - the original and still the be » Sun, 29 Oct 1995 04:00:00


:  Hi,

:  Can I set up one file in order to have only one fd ?

:  I want to do that only one process can read it.

unlink (delete) the 'file' after openning it.

Cheers,


--
<A HREF="http://scitsc.wlv.ac.uk/~cs6171/hack/index.html">unix/net/hack page</A>
<A HREF="http://scitsc.wlv.ac.uk/~cs6171/home.html">Arny's Home Page</A>

 
 
 

How ? One file <----> One file descriptor

Post by Thomas Richter x32 » Tue, 31 Oct 1995 04:00:00


You can use locking for exclusive access.
--
Thomas Richter               My Opinion, not            Office:IPNET(RICHTER)

 
 
 

How ? One file <----> One file descriptor

Post by Zlatko Calus » Thu, 02 Nov 1995 04:00:00


:  Hi,

:  Can I set up one file in order to have only one fd ?

:  I want to do that only one process can read it.

:  Thanks in advance

man lockf
man fcntl (SETLK, GETLK, ...)

--
 __________
/\  _______\
\ \ \____  /  Posted by Zlatko Calusic

  \ \/ / /  URL: http://fly.cc.fer.hr/~maverick
   \  / /  ---------------------------------------------------------------
    \/_/  Faculty of Electrical and Computer Engineering, Zagreb, Croatia

 
 
 

How ? One file <----> One file descriptor

Post by Christopher Oliv » Sun, 12 Nov 1995 04:00:00



: You can use locking for exclusive access.

This would work only if you had either mandatory locking on the file
or a restricted set of programs which would respect the advisory locks.
N.b. Not all OSes support mandatory locks; Linux 1.2.x is one example.

--
Christopher Oliver                     Traverse Communications
Systems Coordinator                    223 Grandview Pkwy, Suite 108

'tis an ill wind that blows no minds.