> + proc_path = "/proc/%d/cmdline" % pid
> + with open(proc_path, 'r') as f:
> + nulled_cmdline = f.read()
> + # Spaces are replaced with nul chars in the command line - let's turn them
> + # back
> + return nulled_cmdline.replace('\x00', ' ')
I don't think that spaces are replaced by 0 characters; instead the individual
arguments are concatenated with 0 characters as separators. This is not the
same,
as command-line arguments may contain spaces.
--
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores