Daniel Pope
Daniel Pope
POC code for to modify process args on Linux: ```python import time import sys from ctypes import pythonapi, c_int, c_char_p, c_char, POINTER, byref, cast argc = c_int() argv = POINTER(POINTER(c_char))()...
According to [this message](http://bugs.python.org/msg108524), this approach is much harder in Python 3.
This is the searching backwards approach described in the above message: ```python >>> from ctypes import * >>> env_addr = POINTER(c_void_p).in_dll(pythonapi, 'environ')[0] >>> c_char_p(env_addr - 10).value b'python3.6' ```
This is the `prctl()` part, to set the process name (which is separate from the arguments list): ```python >>> libc = CDLL('libc.so.6') >>> PR_SET_NAME = 15 >>> title = c_char_p(b'chopsticks')...
The `ssh` subprocess is still running. Perhaps some options to ssh can help it detect connection loss.
We should pass `-o BatchMode=yes` to `ssh` - this is both appropriate and sets `ServerAliveInterval` to 300. (Lower might be more appropriate).
You would use os.mkdir() to make directories and subprocess.check_call() and similar to execute the subprocess. If you can write the function or functions you'd want to execute remotely, the docs...
I don't think Chopsticks itself should be opinionated about project layout. Purely as a suggestion however, there are two components that you might want to keep separate: code that you...
I investigated this a little, but it seems that the handling of the `--quiet` option in flake8 [overrides the --format option](https://github.com/PyCQA/flake8/blob/f0d63a5a998011d95eaa31c994a295a085bd8000/src/flake8/main/application.py#L261), so flake8-html isn't even invoked if --quiet is passed....
Reported upstream as [issue #404](https://gitlab.com/pycqa/flake8/issues/404) (issue not found).