()
| 47 | |
| 48 | |
| 49 | def _get_platform_max_length() -> int: # pragma: no cover (platform specific) |
| 50 | if os.name == 'posix': |
| 51 | maximum = os.sysconf('SC_ARG_MAX') - 2048 - _environ_size() |
| 52 | maximum = max(min(maximum, 2 ** 17), 2 ** 12) |
| 53 | return maximum |
| 54 | elif os.name == 'nt': |
| 55 | return 2 ** 15 - 2048 # UNICODE_STRING max - headroom |
| 56 | else: |
| 57 | # posix minimum |
| 58 | return 2 ** 12 |
| 59 | |
| 60 | |
| 61 | def _command_length(*cmd: str) -> int: |
no test coverage detected