Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: better logging when spawn() fails
If someone sends us an invalid thing to run, right now we just silently swallow it, because the logging module doesn't work after we've forked. Instead, let's just keep around what we're going to exec (being smart about shell=True invocations so we don't just do a lookup of "/bin/sh") and do a path lookup on it. If it doesn't exist, we can fail without doing all the forking and give the user a real error message. While arguably not logging anything is fine (someone typed an invalid thing), I've seen a lot of confusion more recently about spawn not working because of typos and such. Hopefully this will fix things. Signed-off-by: Tycho Andersen <[email protected]>
- Loading branch information