You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From #12. Is there a specification on how ps formats the command line if it contains special characters (spaces in argument, quotes, etc.)? It seems that it is not using the “normal” shell escaping syntax, which makes the it unsuitable to parse with shlex.split().
The text was updated successfully, but these errors were encountered:
Heh that’s interesting. If I’m reading it right, ps only escapes newlines and unprintable characters, but separate arguments with spaces. So a command line like this cmd foo 'bar baz' would be reported as cmd foo bar baz, and there’s no way to unambigiously tell what is what.
I guess all we can do is to split with space, and hope for the best. Or maybe we forgo ps altogether and tap into POSIX C API directly. We already do that for Windows anyway.
From #12. Is there a specification on how
ps
formats the command line if it contains special characters (spaces in argument, quotes, etc.)? It seems that it is not using the “normal” shell escaping syntax, which makes the it unsuitable to parse withshlex.split()
.The text was updated successfully, but these errors were encountered: