How can an original command issued at the command line be acquired without using proc or any other non standard tool?
When printing a process list using ps
, the arguments passed in to initiate the command are shown without quotes, which is not how the original command was issued. It also appears that no combination of ps
options can achieve this either.
After searching for quite some time and even reviewing the hard to find ps
source code, there was no simple answer. Currently there are other posts mentioning the same issue but are either unanswered or the solutions proposed are not satisfactory. The ps
source code can probably be edited to achieve the necessary result, but this approach is not preferred as ps
is actually a non standard package that was coded significantly differently for every operating system it was on. For example the source code for ps
on MacOS is drastically different than the source code for ps
on ubuntu.