News for hackers. Stuff that matters.
Re:GNU/Linux shell related internals by usr1106 on Sunday December 18, 2022 @08:18AM (#34037398)
The headline seems weird. The list of file descriptors etc etc does not sound like shell internals, hut like Unix operating system concepts.
Re:GNU/Linux shell related internals by ytch on Sunday December 18, 2022 @08:35AM (#34037495)
It more likes "How shell invokes a command", I have a POSIX programming course in university, one homework is to implement a simple shell, you need to handle the FDs, Pipes, environment variables by POSIX API as the article explains.
Re:GNU/Linux shell related internals by supriyo-biswas on Sunday December 18, 2022 @08:27AM (#34037446)
If you're after how the shell parses commands, the EBNF grammar in the POSIX specification is a good start:

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...

Unfortunately, there's not much to a shell other than it's parsing capabilities.

Re:GNU/Linux shell related internals by chasil on Sunday December 18, 2022 @10:19AM (#34038473)
It is unfortunate that an LR-parsed language was chosen.

https://archive.fosdem.org/2018/schedule/event/code_parsing_...

Re:GNU/Linux shell related internals by dottedmag on Sunday December 18, 2022 @08:58AM (#34037662)
Shell internals and Unix internals are pretty intertwined. Amount of ancient syscalls and ioctls that exist directly to support shells is quite large.