By commenting out the 2 lines
save_scalar(gv); /* local $0 */
sv_setpv_mg(GvSV(gv), directive->filename);
in modperl_cmd.c I have been able to see the proper arguments in the ps output instead of the -e which was seen before. I wasn't sure of exactly what these 2 lines are doing. I however see that the perl directives that have been added inside the Perl block are being parsed.
Diff
{
SV *code = newSVpv(arg, 0);
GV *gv = gv_fetchpv("0", TRUE, SVt_PV);
ENTER;SAVETMPS;
- save_scalar(gv); /* local $0 */
- sv_setpv_mg(GvSV(gv), directive->filename);
eval_sv(code, G_SCALAR|G_KEEPERR);
SvREFCNT_dec(code);
modperl_env_sync_srv_env_hash2table(aTHX_ p, scfg);
modperl_env_sync_dir_env_hash2table(aTHX_ p, dcfg);
FREETMPS;LEAVE;
}
Thanks and Regards,
Pradeep
On 10/13/05, Philip M. Gollucci <[EMAIL PROTECTED]> wrote:
Philippe M. Chiasson wrote:
> Still unable to reproduce this on my end.
This help any ?
gdb httpd (wd: ~/dev/apps/httpd- 2.3.0/prefork/bin)
b modperl_cmd.c:559
[snip]
bt full
#0 modperl_cmd_perldo (parms=0xbfbfe9e0, mconfig=0x81056d0,
arg=0x8133798 "package
Apache2::ReadConfig::usr::home::pgollucci::dev::apps::httpd_2_3_0::prefork::conf::mod_perl_conf::line_78;\n#line
78 /usr/home/pgollucci/dev/apps/httpd-2.3.0/prefork/conf/mod_perl.conf\n\n") at
modperl_cmd.c:560
code = (SV *) 0x8138c2c
gv = (GV *) 0x8138908
p = (apr_pool_t *) 0x80bc018
s = (server_rec *) 0x80c1988
dcfg = (modperl_config_dir_t *) 0x81056d0
options = (apr_table_t *) 0x8125018
handler = (modperl_handler_t *) 0x81335d8
pkg_name = 0x8133660
"Apache2::ReadConfig::usr::home::pgollucci::dev::apps::httpd_2_3_0::prefork::conf::mod_perl_conf::line_78"
directive = (ap_directive_t *) 0x8125158
scfg = (modperl_config_srv_t *) 0x8105100
#1 0x08077ce3 in invoke_cmd (cmd=0x283a1420, parms=0xbfbfe9e0,
mconfig=0x81056d0, args=0x8125150 "\n") at config.c:735
w = 0x8078ce8 "\203Ä [EMAIL PROTECTED]@\f%"
w2 = 0xbfbfe988 "¸é¿¿¬\215\a\bXQ\022\bàé¿¿Hç\016\b4-da11-9dca-0002e33b"
w3 = 0x81056d0 ""
errmsg = 0x0
#2 0x08078d1c in ap_walk_config_sub (current=0x8125158, parms=0xbfbfe9e0,
section_vector=0x80ee748) at config.c:1141
dir_config = (void *) 0x81056d0
retval = 0x0
cmd = (const command_rec *) 0x283a1420
ml = (ap_mod_list *) 0x8103458
dir = 0x8133418 "perl"
#3 0x08078dac in ap_walk_config (current=0x8125158, parms=0xbfbfe9e0,
section_vector=0x80ee748) at config.c:1174
errmsg = 0x0
oldconfig = (ap_conf_vector_t *) 0x0
#4 0x08079c05 in ap_process_config_tree (s=0x80c1988, conftree=0x80efcb8,
p=0x80bc018, ptemp=0x80ec018) at config.c:1743
errmsg = 0x0
parms = {info = 0x0, override = 150, limited = -1, limited_xmethods =
0x0, xlimited = 0x0, config_file = 0x0, directive = 0x8125158, pool = 0x80bc018,
temp_pool = 0x80ec018, server = 0x80c1988,
path = 0x0, cmd = 0x283a1420, context = 0x80ee748, err_directive = 0x0,
override_opts = 239}
#5 0x08061dc7 in main (argc=4, argv=0xbfbfeb04) at main.c:616
c = 100 'd'
configtestonly = 0
confname = 0x80954cd "conf/httpd.conf"
def_server_root = 0xbfbfec59 ".."
temp_error_log = 0x0
error = 0x0
process = (process_rec *) 0x80ba098
server_conf = (server_rec *) 0x80c1988
pglobal = (apr_pool_t *) 0x80ba018
pconf = (apr_pool_t *) 0x80bc018
plog = (apr_pool_t *) 0x80ea018
ptemp = (apr_pool_t *) 0x80ec018
pcommands = (apr_pool_t *) 0x80be018
opt = (apr_getopt_t *) 0x80be0b0
rv = 70014
mod = (module **) 0x280a6261
optarg = 0xbfbfec59 ".."
signal_server = (apr_OFN_ap_signal_server_t *) 0x2824fe40 <__isthreaded+28>
(gdb) x directive->filename
0x8121200: 0x7273752f
(gdb) p directive->filename
$3 = 0x8121200 "/usr/home/pgollucci/dev/apps/httpd-2.3.0/prefork/conf/mod_perl.conf"
(gdb)
FYI, mod_perl.conf contains my
<Perl>
</Perl>
section
at this point,
ps -aux | grep httpd
111:pgollucci 53023 0.0 15.8 81684 81056 p6 T 1:42AM 0:01.54 gdb httpd
112:pgollucci 53044 0.0 2.0 11148 10300 p6 TX 1:42AM 0: 00.39 (httpd)
114:pgollucci 53259 0.0 0.0 348 208 p6 R+ 1:47AM 0:00.00 grep -nR httpd
If I let gbd continue, I end up with
ps -aux | grep httpd
111:pgollucci 53023 0.0 15.8 81684 81056 p6 T 1:42AM 0: 01.54 gdb httpd
112:pgollucci 53044 0.0 2.0 11148 10300 p6 TX 1:42AM 0:00.39 -e (httpd)
114:pgollucci 53270 0.0 0.0 348 208 p6 R+ 1:48AM 0:00.00 grep -nR httpd
--
END
------------------------------------------------------------
What doesn't kill us can only make us stronger.
Nothing is impossible.
Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
http://www.liquidityservicesinc.com
http://www.liquidation.com
http://www.uksurplus.com
http://www.govliquidation.com
http://www.gowholesale.com