Date: Sat, 21 Jun 2003 02:27:38 -0700 From: David Schultz <das@FreeBSD.ORG> To: Pete French <pfrench@firstcallgroup.co.uk> Cc: stable@FreeBSD.ORG Subject: Re: procfs problems -cmdline turncated at 256 bytes ? Message-ID: <20030621092738.GA2401@HAL9000.homeunix.com> In-Reply-To: <E19TM9P-000J3O-00@mailhost.firstcallgroup.co.uk> References: <E19TM9P-000J3O-00@mailhost.firstcallgroup.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030621092738.GA2401>