diff options
| author | Ingo Molnar <mingo@kernel.org> | 2023-02-23 09:16:39 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2023-02-23 09:16:39 +0100 |
| commit | 585a78c1f77be305b1f6adad392f16047fb66ffd (patch) | |
| tree | 765143b487d582832c7695c9fbcae141c35baa4c /scripts/jobserver-exec | |
| parent | 37064583f63eca93c98a9cdf2360485ea05f617a (diff) | |
| parent | 69308402ca6f5b80a5a090ade0b13bd146891420 (diff) | |
| download | lwn-585a78c1f77be305b1f6adad392f16047fb66ffd.tar.gz lwn-585a78c1f77be305b1f6adad392f16047fb66ffd.zip | |
Merge branch 'linus' into objtool/core, to pick up Xen dependencies
Pick up dependencies - freshly merged upstream via xen-next - before applying
dependent objtool changes.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'scripts/jobserver-exec')
| -rwxr-xr-x | scripts/jobserver-exec | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/scripts/jobserver-exec b/scripts/jobserver-exec index 4192855f5b8b..7eca035472d3 100755 --- a/scripts/jobserver-exec +++ b/scripts/jobserver-exec @@ -26,11 +26,20 @@ try: # If the MAKEFLAGS variable contains multiple instances of the # --jobserver-auth= option, the last one is relevant. fds = opts[-1].split("=", 1)[1] - reader, writer = [int(x) for x in fds.split(",", 1)] - # Open a private copy of reader to avoid setting nonblocking - # on an unexpecting process with the same reader fd. - reader = os.open("/proc/self/fd/%d" % (reader), - os.O_RDONLY | os.O_NONBLOCK) + + # Starting with GNU Make 4.4, named pipes are used for reader and writer. + # Example argument: --jobserver-auth=fifo:/tmp/GMfifo8134 + _, _, path = fds.partition('fifo:') + + if path: + reader = os.open(path, os.O_RDONLY | os.O_NONBLOCK) + writer = os.open(path, os.O_WRONLY) + else: + reader, writer = [int(x) for x in fds.split(",", 1)] + # Open a private copy of reader to avoid setting nonblocking + # on an unexpecting process with the same reader fd. + reader = os.open("/proc/self/fd/%d" % (reader), + os.O_RDONLY | os.O_NONBLOCK) # Read out as many jobserver slots as possible. while True: |
