From owner-freebsd-stable@FreeBSD.ORG Sat Jun 21 02:28:03 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5DBBD37B401 for ; Sat, 21 Jun 2003 02:28:03 -0700 (PDT) Received: from HAL9000.homeunix.com (ip114.bella-vista.sfo.interquest.net [66.199.86.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id C601943F3F for ; Sat, 21 Jun 2003 02:28:02 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.9/8.12.9) with ESMTP id h5L9RrJa014631; Sat, 21 Jun 2003 02:27:53 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.9/8.12.9/Submit) id h5L9RcZE014628; Sat, 21 Jun 2003 02:27:38 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Sat, 21 Jun 2003 02:27:38 -0700 From: David Schultz To: Pete French Message-ID: <20030621092738.GA2401@HAL9000.homeunix.com> Mail-Followup-To: Pete French , stable@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: stable@FreeBSD.ORG Subject: Re: procfs problems -cmdline turncated at 256 bytes ? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2003 09:28:03 -0000 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.