Received: by taz.hyperreal.com (8.6.12/8.6.5) id KAA06563; Fri, 26 Apr 1996 10:15:45 -0700 Received: from ooo.lanl.gov by taz.hyperreal.com (8.6.12/8.6.5) with ESMTP id KAA06548; Fri, 26 Apr 1996 10:15:42 -0700 Received: by ooo.lanl.gov (1.37.109.16/16.2) id AA106048930; Fri, 26 Apr 1996 11:15:30 -0600 From: Rob Hartill Message-Id: <199604261715.AA106048930@ooo.lanl.gov> Subject: Re: ScriptAlias-like extensions for perl etc To: new-httpd@hyperreal.com Date: Fri, 26 Apr 96 11:15:30 MDT In-Reply-To: <199604261708.MAA15657@austin.bsdi.com>; from "Tony Sanders" at Apr 26, 96 12:08 (noon) X-Organization: Theoretical Division, T-8. Los Alamos National Laboratory X-Snail: LANL Theoretical Divi' T-8, MS B285, P.O Box 1663, Los Alamos NM 87545 X-Marks-The-Spot: Doh ! X-Url: http://nqcd.lanl.gov/~hartill/ X-Cessive-Use-Of-Headers: check Mailer: Elm [revision: 70.85] Sender: owner-new-httpd@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com > Rob Hartill writes: > > All my CGI is written in perl. As an experiment I changed > > mod_cgi.c to call the perl binary directly instead of leaving > > it to sh (I think that's what gets called to determine that perl > > needs to be called because of the "#!" first line.) > That's a negative. exec() [in the kernel that is] looks at the > file for the magic number ``#!'' and if present parses the line > for the binary to actually exec. This is true on all Unix systems. Hmm. Intersting. I must be confusing it with perl's exec, but the "problem" has been mentioned before and someone hacked a similar "solution". > You would need to do some profiling to find out what was going on > but your change would not affect real performance in any measureable way. The speedup was small, but it was there over a number of tests, which alternated between my hack switched on and off.