Re:Sockets in Your Shell
by dx87 on Thursday December 03, 2020 @09:40AM
(#25289236)
Bash isn't putting anything in /dev. It checks to see if those files exist (I've never seen them actually exist though), and if they aren't there, it just parses the string and creates a network connection as though they did exist.
[ Parent
| on HN ]
Re:Sockets in Your Shell
by HelloNurse on Thursday December 03, 2020 @12:26PM
(#25291560)
Bash is not even pretending such special files exist: /dev/tcp/somewhere is only an elegant syntactic shortcut for requesting a telnet-like network connected pipe in a context in which a filename is required.
For the child process, it's just a file descriptor.