From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pantransit.reptiles.org ([209.157.133.146]) by hawkwind.utcs.toronto.edu with SMTP id <24842>; Tue, 9 May 2000 18:54:08 -0400 Received: (qmail 2857 invoked by uid 204); 9 May 2000 04:34:20 -0000 Date: Tue, 9 May 2000 00:34:20 -0400 Message-ID: <20000509043420.2856.qmail@pantransit.reptiles.org> From: "Smarasderagd" To: david_luyer@pacific.net.au, tjg@star.le.ac.uk Subject: Re: building rc on QNX4 Cc: rc@hawkwind.utcs.toronto.edu David Luyer writes: >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. In some cases this limit is enforced by the operating system; execve() chokes on Linux if the arguments plus environment exceed (I think) 128K. >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. If you don't need to export anything but non-array variables, the "-i" or "-" option to "env" does what you want. For the other cases: You could have a whatis option (or a gnarly function that understands enough rc syntax not to be fooled by newlines in quoted strings) that spews null assignments / definitions for everything, and then eval the result filtered for the things you want to preserve, but eeuugh. If a function is that big it won't be much slower if it's a script instead.