Re: /dev/tcp
The Natural Philosopher <[email protected]>
| Newsgroups | comp.os.linux.misc |
|---|---|
| Organization | A little, after lunch |
| Message-ID | <[email protected]> |
On 23/08/2026 14:37, Lars Poulsen wrote: > On 2026-08-19 14:20, Eli the Bearded wrote: >> What system(s) have /dev/tcp/* natively? >> [...] >> /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 the corresponding TCP socket. > > After several days, we have now ascertained that nobody ever implemented > this with a true device interface - it is a fiction implemented by the > shell intercepting the filename and diverting it. > All interfaces are fiction. In this case its one implemented by the shell > Which is kinda strange. It seems like it should be easier to really do > it as a true device interface. It would be easier for quick-and-dirty > programs than the socket interface. Maybe the problem is the DNS lookup > would have to be done below the kernel boundary? But would it really be > that much harder than the weird stuff done with virtual file systems? > Sockets were always crap. There are other options for specific connections e.g. curl and friends. -- “when things get difficult you just have to lie” ― Jean Claud Jüncker