From owner-freebsd-current Wed Apr 23 02:46:16 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id CAA19822 for current-outgoing; Wed, 23 Apr 1997 02:46:16 -0700 (PDT) Received: from sovcom.relcom.ru (sovcom.relcom.ru [193.125.152.1]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id CAA19814 for ; Wed, 23 Apr 1997 02:45:55 -0700 (PDT) Received: by sovcom.relcom.ru id AA13434 (5.65.kiae-1 ); Wed, 23 Apr 1997 12:15:31 +0300 Received: by sovcom.KIAE.su (UUMAIL/2.0); Wed, 23 Apr 97 12:15:30 +0300 Received: (from ache@localhost) by nagual.pp.ru (8.8.5/8.8.5) id NAA00279; Wed, 23 Apr 1997 13:13:46 +0400 (MSD) Date: Wed, 23 Apr 1997 13:13:41 +0400 (MSD) From: =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= To: David Greenman Cc: current@freebsd.org Subject: Re: Recent vfork kernel changes broke csh & tcsh! In-Reply-To: <199704230614.XAA01914@root.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Tue, 22 Apr 1997, David Greenman wrote: > I don't recall seeing Tor's suggested change. I've looked at various ways > of doing this differently in the past and didn't like any of the solutions > I thought up. I'll try to keep an open mind, however. He forget Cc to current@, here it is: Just add another field in struct image_params, called e.g. argv0, initially set it to NULL in execve, and change code in exec_extract_strings from while ((argp = (caddr_t) fuword(argv++))) { .... } to argp = (caddr_t) fuword(argv++); if (imgp->argv0) argp = imgp->argv0; if (argp) { do { .... } while ((argp = (caddr_t) fuword(argv++))); } copying the whole argv is an excessive modification. Then imgact_shell can set imgp->argv0 to the file name instead of writing to memory areas that are 'const' according to the execve prototype. - Tor Egge -- Andrey A. Chernov http://www.nagual.pp.ru/~ache/