forked from ninja-build/ninja
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch from Antoine Labour <piman@chromium.org>, (hacky) test by me.
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This build file prints out a list of open file descriptors in | ||
# Ninja subprocesses, to help verify we don't accidentally leak | ||
# any. | ||
|
||
# Because one fd leak was in the code managing multiple subprocesses, | ||
# this test brings up multiple subprocesses and then dumps the fd | ||
# table of the last one. | ||
|
||
# Use like: ./ninja -f misc/inherited-fds.ninja | ||
|
||
rule sleep | ||
command = sleep 10000 | ||
|
||
rule dump | ||
command = sleep 1; ls -l /proc/self/fd; exit 1 | ||
|
||
build all: phony a b c d e | ||
|
||
build a: sleep | ||
build b: sleep | ||
build c: sleep | ||
build d: sleep | ||
build e: dump |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters