From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sunny.pacific.net.au ([210.23.129.40]) by hawkwind.utcs.toronto.edu with SMTP id <25708>; Mon, 8 May 2000 18:51:55 -0400 Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id VAA08710; Mon, 8 May 2000 21:50:19 +1000 (EST) Received: from typhaon.pacific.net.au (typhaon.pacific.net.au [210.23.128.128]) by wisma.pacific.net.au with ESMTP id VAA17928; Mon, 8 May 2000 21:50:18 +1000 (EST) Received: from pacific.net.au (luyer@localhost [127.0.0.1]) by typhaon.pacific.net.au (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id VAA20547; Mon, 8 May 2000 21:50:18 +1000 Message-Id: <200005081150.VAA20547@typhaon.pacific.net.au> X-Authentication-Warning: typhaon.pacific.net.au: Host luyer@localhost [127.0.0.1] claimed to be pacific.net.au X-Mailer: exmh version 2.1.1 10/15/1999 (debian) To: Tim Goodwin cc: rc@hawkwind.utcs.toronto.edu Subject: Re: building rc on QNX4 In-Reply-To: Message from Tim Goodwin of "Mon, 08 May 2000 04:29:54 -0400." References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 8 May 2000 07:50:18 -0400 From: David Luyer Tim Goodwin wrote: > > another > > one is whether it will ever make it possible not to export everything to > > the environment by default. > > I brought this up a few months ago, and the consensus seemed to be that > the current scheme works well enough in practice. Have you encountered > a problem? I encountered a problem with this years ago but just started using "su -" when I was trying to get programs to run that it broke. Basically some OS's (Digital Unix for one I think) have C libraries which choke horribly if the size of the command line + environment array is greater than a certain value, and if you have a number of complex functions in your shell this value (64k?) can be a pain. Although it is really useful to have the shell functions inherited by a shell which was spawned from some unrelated program running under the initial shell, maybe we need some way to prevent this in specific cases? Maybe some syntax along the lines of: (+ HOME PATH path USER LOGNAME "fn "*) /usr/sbin/cron & to pass HOME, PATH, path, USER, LOGNAME and fn_* only (- "fn "*) /usr/sbin/cron & to pass everything but fn_* But then - as with most things this could be done in a function eg: run sh with HOME USER LOGNAME run sh without "fn "* which could be implemented relatively easily if there was an option to whatis to just list variables instead of show what they are. (eg: "whatis -fq" - list functions, "whatis -vq" - list variables) Anyway - basically - I think it might be more useful to extend whatis such that it can be used to implement easily a facility to run a command without any environment variables, rather than to actually implement that facility internally. David. -- ---------------------------------------------- David Luyer Senior Network Engineer Pacific Internet (Aust) Pty Ltd Phone: +61 3 9674 7525 Fax: +61 3 9699 8693 Mobile: +61 4 1064 2258, +61 4 1114 2258 http://www.pacific.net.au NASDAQ: PCNTF << fast 'n easy >> ----------------------------------------------