perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Jacobowitz <d...@andrew.cmu.edu>
Subject Re: getting core dumped
Date Sun, 02 Sep 2001 17:09:10 GMT
On Fri, Aug 31, 2001 at 02:31:43PM +0800, Stas Bekman wrote:
> > > just before ./t/TEST is run in Makefile, is the simplest solution. Or
> > > would this have cross-platform problems.
> >
> > i hardly ever use 'make test', especially with httpd-test.  i just run
> > t/TEST directly.  and think about nightly batch jobs that will 'make' once
> > and run t/TEST many:
> > t/TEST apxs ~/ap/prefork/bin/apxs
> > t/TEST -ssl
> > t/TEST apxs ~/ap/worker/bin/apxs
> > t/TEST -ssl
> > t/TEST -proxy
> > etc.
> 
> but setting 'ulimit' in the parent shell once is enough. So if you run
> once 'make', it should be good enough to unset the limit.
> 
> Hence I thought what would be the damage if we put into Makefile:
> 
> test :: set_limit pure_all run_tests test_clean unset_limit
> 
> set_limit:
> 	cur_limit=`ulimit -c`
> 	ulimit -c unlimited
> 
> unset_limit:
> 	# restore the limit to its originals
> 	ulimit -c $cur_limit

This won't work :)  In fact, there's at least three reasons it won't
work: 

 - ulimit is a shell builtin.  It affects the shell that runs it only. 
   Every separate line in a Makefile not connected with
   backslash-newline gets its own shell.
 - shell variables are local to the shell, so cur_limit won't get
   passed along either
 - Most of all, dependency order does not mean anything.  The
   dependencies can be built in random order, and often are.

You could do:

test: pure_all
	ulimit -c unlimited; $(MAKE) run_tests
	$(MAKE) test_clean


(Note that 'test :: pure_all run_tests test_clean' has the same
dependency ordering problems I mentioned.)

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message