On Fri, Jun 20, 2003, Pete French wrote:>
> running 4.8 stable, the cmdline file in /proc/$$ seems to be trucated
> at, or before 256 bytes for very long command lines. I cant find
> any refernec to this behaviour in the manpage, nor does google reveal
> anything. I took a look in the source, but didnt properly understand what
> was going on - the comments imply that it does give the full commandline
> for the current process, however.
>
> any suggestions ? any alternative ways to get hold of the arguments from
> within a running program (which doesnt have access to "main()").
You may be able to get this to work if you use dd with a large
enough block size, assuming dd doesn't get confused by the extra
EOFs. There's a similar issue with the code that prints the
process' memory map, and in that case, making the transfer size
larger works around the problem.