bug-bash
[Top][All Lists]
Advanced

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

Re: /dev/udp|tcp/host/port and symbolic links


From: Uwe Klein
Subject: Re: /dev/udp|tcp/host/port and symbolic links
Date: Tue, 09 Jul 2002 12:56:13 +0200

Andreas Schwab wrote:
> 
> uwe-klein@foni.net (Uwe Klein) writes:
> 
> |> Hi,
> |>
> |> being able to redirect output to /dev/<proto>/<host>/<port>
> |> is very usefull ( Thanks for the feature !)
> |> I use this feature together with MultiCast Adresses
> |> to send cmds and data to multiple processes on a set of hosts.
> |>
> |> usage like this is ok:
> |>
> |>      echo hello >/dev/udp/224.1.0.0/7773
> |>
> |> But i could not refrain from trying:
> |>
> |>      ln -s /dev/udp/224.1.0.0/7773 bclog
> |>      echo hello >bclog
> |>
> |> this breaks with
> |>
> |>      bash: bclog: Not a directory
Yes, OK its the errormessages from the system! ( ENODIR )
> 
> This is not possible.  The file name is interpreted by bash, it does not
> exist anywhere outside of bash.

If I read the sources right:
Filenames for redirection are first ckecked against bash-specialnames
"redir.c"

if not special they are given to the system directly.

What about dereferencing the filename with "linkname()" on open error
"ENODIR" 
and checking for specialnames again?
wouldn't this give symlink handling for all special filenames?

or is that "superschlau"


> 
> Andreas.
G!
uwe
-- 
Uwe Klein [mailto:uwe-klein@foni.net]
KLEIN MESSGERAETE Habertwedt 1
D-24376 Groedersby b. Kappeln, GERMANY
phone: +49 4642 920 123 FAX: +49 4642 920 125



reply via email to

[Prev in Thread] Current Thread [Next in Thread]