File: 2007_08_15_no_extra_fork_unix.test

package info (click to toggle)
makepp 2.0.98.5-2.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 2,744 kB
  • sloc: perl: 15,893; makefile: 38; javascript: 25; sh: 1
file content (23 lines) | stat: -rw-r--r-- 760 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
###	SPAR <http://www.cpan.org/scripts/>
###	17	644	1103567918	1211618426	Makeppfile
# Test to verify (on UNIX) that we don't have an unnecessary fork on the
# last action, which could waste an enormous amount of memory.
# Set SLEEP if you want to debug the process tree using pstree.

ifdef SLEEP
export SLEEP
endif

# The process of the last action should be the 'sh' running the 'checker'
# script (because there are no shell metacharacters in the action), which
# should be the same PID as the makepp process that is running the rule,
# because it should have been exec'ed therefrom.
EMPTY =
$(phony pidcheck):
	perl { $ENV{PID} = $$ }
	./checker
	$(EMPTY)
###	3	755	1103567918	1187882940	checker
#! /bin/sh
[ "$SLEEP" ] && sleep 60
[ $PID = $$ ] || exit 1