This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Symlinks under /proc


On Tue, 1 Feb 2005, Corinna Vinschen wrote:

> On Feb  1 09:38, Igor Pechtchanski wrote:
> > On Tue, 1 Feb 2005, Corinna Vinschen wrote:
> > > Correct.  The name for pipes and, FWIW, AF_INET sockets, is generated
> > > following the Linux naming rules, but it's not possible to resolve it.
> > > I'm not sure how to implement that right now.
> >
> > Looks like Linux resolves this at the kernel level, in the link processing
> > code.  The following (on Linux) shows that the link target is not resolved
> > outside of a link:
>
> I've checked in code which allows to resolve pipes and sockets.  In
> contrast to Linux, the patch does not allow to re-open the pipe.  Instead,
> it behaves as if the process tries to oopen a socket, it returns -1 and
> sets errno to ENXIO.
>
> I have a vague idea how to implement opening such a pipe of another
> process, but I have to mull over it a bit longer.

Great, thanks -- I'll test it as soon as I have the time to rebuild from
CVS.  For implementing /dev/std*, there's no need to allow opening the
pipes from another process, as any process accessing /dev/stdin will be
accessing its own fd/0.  I'm not even sure Linux allows other processes to
access these pipes.

As far as reopening a pipe, I'm having a hard time visualizing a situation
where this would happen.  What would be an example of code that does it?
An lseek on /dev/stdin?
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]