Re: hardcoded /tmp instead of TMPDIR



On Wed, 11 Sep 2002, Pavel Roskin wrote:

> > I still hope to avoid the pipe completely, since it's not portable to
> > Cygwin.
> 
> Not so easy.  It I run "tcsh 3>log", /proc shows that the open file
> descriptors are 15, 16, 17, 18 and 19.  The same if I run "tcsh".  In
> other words, tcsh closes the files it inherits from the parent process.  
> Which leaves us with pipes, UNIX sockets, SysV IPC, TCP/IP and other
> things, of which the pipes are still the simplest solution.  TCP/IP may be 
> more portable, but it would be a huge overkill.

Hello, Pavel!

Do you see any way to use AF_INET sockets at all ? I think it is not 
possible - where is the shell going to redirect the output of 'pwd' ?
I.e. you need a shell capabale to write to localhost:8888 let's say. I see 
the bash man page mentions something about /dev/tcp/hostname/port filename 
handling, but that is only bash, tchs doesn't seem to support it. Btw a 
very easy solution for tcsh is to redirect the output of 'pwd' to 
/proc/parent_pid/fd/write_end_of_pipe - that is create by a call to pipe 
(). It's a pity though that not all operationg systems support that :(

Thanks!

Pavel Tsekov




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