5 ms·
> (no file system would need a path longer than 260 characters, right? :o) ) This is poking fun at Windows' PATH_MAX, but it's very easy to hit BINPRM_BUF_SIZE
by delsarto 7y ago
> (no file system would need a path longer than 260 characters, right? :o) )
This is poking fun at Windows' PATH_MAX, but it's very easy to hit BINPRM_BUF_SIZE's 128 character path limit for #! lines; maybe not so much for humans, but with CI systems installing things in weird deep directories (e.g. virtualenvs ... see https://github.com/pypa/virtualenv/issues/596 https://github.com/pypa/virtualenv/issues/596).
So the old adage about glass houses and stones is still good advice ;)
- throwaway8941 7y agoNix developers ran into this very limit. https://lwn.net/Articles/779997/ https://lwn.net/Articles/779997/
- aidenn0 7y agoUnless they split the line without whitespace, that example is already non-portable because it's not well defined what happens to shebangs with more than one argument. IIRC linux merges all of them into a single argument, but other unixen do different things.
- saagarjha 7y agoAnd people struggle to find examples of Linux bending over backwards for compatibility…
- m463 7y agoIn unix, there are lots of limits people eventually run into, then either hack to overcome, or go back and painfully rearchitect. - max size of a command line - max open files - kernel stack size etc...
- mmis1000 7y agoI didn't hit that until I am start using node.js... Then the npm<3 install modules in a dawn nested way and actually cause problem.