3 ms·
Right, the system() function in C, which PHP probably uses, and is os.system() in Python, is DEFINED to run /bin/sh. You never know when a program might call i
by chubot 9y ago
Right, the system() function in C, which PHP probably uses, and is os.system() in Python, is DEFINED to run /bin/sh. You never know when a program might call it (although I agree it is almost always bad practice to use it -- use fork/exec instead.)
So basically you should never make /bin/sh fish, because then you will no longer have a Unix system (according to POSIX).
- hrktb 9y agoPHP somewhat takes the user’s login shell, so I guess it’s yet a different system. If it was taking /bin/sh it would have been fine actually.
- TylerE 9y agoDon't blame the rest of the world for PHP's brain damage.
- aspaceman 9y agoNot sure I understand what you mean. /bin/sh is the system shell, I don't believe it's possible to make it fish unless you change the symlink itself. On ubuntu, /bin/sh is always dash and it's not possible to change without changing the symlink: https://wiki.ubuntu.com/DashAsBinSh https://wiki.ubuntu.com/DashAsBinSh So, if you use chsh to make your shell fish, it would have no effect on os.system or the system function in C.