I’d like to create a subprocess with a lot of arguments. Every OS has some upper limit on how long the commandline can be. For my purposes, creating a process with X arguments, then creating a second process with the next Y arguments, then creating a third process with the next Z arguments etc. is an acceptable workaround. But I can’t see any obvious way to see if the next arg will push me over the limit. I can’t even see an OS-agnostic way to see if a given spawn call failed because the command-line was too long.
Am I missing something, or do I need to raise some feature-request/bug against std::process::Command? And in the meantime implement my own estimation of how long the command-line will be and track down some lowest-common-denominator limit across all OSs I can use as a hard-coded limit?