4 ms·
ever wonder why linux supports command line arguments that are 2mb long?
by packetslave 5y ago
ever wonder why linux supports command line arguments that are 2mb long?
- yegle 5y agoEver wondered absl flags library has a --flagfile special flag? https://abseil.io/docs/python/guides/flags#special-flags https://abseil.io/docs/python/guides/flags#special-flags
- packetslave 5y agoI wonder if ABSL supports gzipped flags...
- yegle 5y agoProbably not, since --flagfile accepts a list of filenames :-) https://github.com/abseil/abseil-cpp/blob/1ae9b71c474628d60eb251a3f62967fe64151bb2/absl/flags/parse.cc#L92 https://github.com/abseil/abseil-cpp/blob/1ae9b71c474628d60e...
- matheusmoreira 5y agoDoes Linux need explicit support for this? Command line arguments and environment variables are copied to the stack of the new process. I would expect the stack's size to be the limiting factor.
- jeffbee 5y agoBefore they relaxed it 15 years ago, Linux had a hard limit at 128KiB for args + env on x86. After the change it was variable up to 2MiB. https://github.com/torvalds/linux/commit/b6a2fea39318e43fee84fa7b0b90d68bed92d2ba https://github.com/torvalds/linux/commit/b6a2fea39318e43fee8...