After Jeff graciously pointed out that some gprof changes had occurred in 2.1-dev, I decided to give it a try and sure enough I could get a gmon.out file. Then, after doing a bunch of diffs, I came to the conclusion that the code defguarded by NO_USE_SIGACTION was removed in 2.1 and I tried defining that, sure enough it works now. Huzzah! (Just thought I'd report in so someone else trying to profile 2.0 will not stumble across this problem.)
weird... there was some code in 2.0.48's prefork.c guarded by NO_USE_SIGACTION that was moved to mpm_common.c in 2.1-dev... it is supposed to be the same :)
So the way to get profiling in 2.0.48:
% setenv CFLAGS '-pg -DGPROF -g -DNO_USE_SIGACTION'
I would normally assume that I broke it when I moved the signal setup related to coredumping signals to mpm_common.c in 2.1-dev. But I think you're saying that the modern sigaction() logic actually works in 2.1-dev, but in 2.0.48 you have to avoid the sigaction() via -DNO_USE_SIGACTION because it is broken :) Very weird.
The big difference between sigaction flavor and no_use_sigaction flavor in 2.0.48 when httpd is started with -X option seems to be that the sigaction flavor sets up handlers for SIGXCPU and SIGXFSZ, whereas the no_use_sigaction flavor does not.
