Re: bash - socket
On Sun, Jul 21, 2002 at 05:04:08PM +0200, /dev/null wrote:
> > Boh, il supporto alle socket e` stato introdotto dalla 2.04. Non
> > so che dirti :(
> Non funziona nemmeno sulle mie macchine. Potresti fare uno strace della
> bash nel momento in cui fai
> $ > /dev/tcp/127.0.0.1/1
> e postarlo?
Sure!
> Sulla mia macchina vien fuori:
> open("/dev/tcp/127.0.0.1/1", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = -1 ENOENT (No such file or directory)
> e quindi bash dice
> bash: /dev/tcp/127.0.0.1/1: No such file or directory
socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
connect(3, {sin_family=AF_INET, sin_port=htons(1), sin_addr=inet_addr("127.0.0.1")}}, 16) = -1 ECONNREFUSED (Connection refused)
Adesso che siete in due mi e` venuto il dubbio che potrebbe
essere la bash pacchettizzata debian, che sia stata compilata in
malomodo (si` io l'ho compilata a manina perche` volevo provare
una patch sull'history, che pero` non ha niente a che fare con le
socket)
Comunque il manuale parla chiaro... non e` una feature nascosta
`/dev/tcp/HOST/PORT'
If HOST is a valid hostname or Internet address, and PORT is an
integer port number or service name, Bash attempts to open a TCP
connection to the corresponding socket.
`/dev/udp/HOST/PORT'
If HOST is a valid hostname or Internet address, and PORT is an
integer port number or service name, Bash attempts to open a UDP
connection to the corresponding socket.
Ciao,
-Roberto
--
To UNSUBSCRIBE, email to debian-italian-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: