summaryrefslogtreecommitdiff
path: root/devdocs/gnu_make/parallel-input.html
blob: a54c9f65b3301cbc7b4aa1e6b59d8f71bc5d5e75 (plain)
1
2
3
4
5
6
  <h1 class="subsection">Input During Parallel Execution</h1>    <p>Two processes cannot both take input from the same device at the same time. To make sure that only one recipe tries to take input from the terminal at once, <code>make</code> will invalidate the standard input streams of all but one running recipe. If another recipe attempts to read from standard input it will usually incur a fatal error (a ‘<samp>Broken pipe</samp>’ signal).  </p> <p>It is unpredictable which recipe will have a valid standard input stream (which will come from the terminal, or wherever you redirect the standard input of <code>make</code>). The first recipe run will always get it first, and the first recipe started after that one finishes will get it next, and so on. </p> <p>We will change how this aspect of <code>make</code> works if we find a better alternative. In the mean time, you should not rely on any recipe using standard input at all if you are using the parallel execution feature; but if you are not using this feature, then standard input works normally in all recipes. </p><div class="_attribution">
  <p class="_attribution-p">
    Copyright © 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Free Software Foundation, Inc. <br>Licensed under the GNU Free Documentation License.<br>
    <a href="https://www.gnu.org/software/make/manual/html_node/Parallel-Input.html" class="_attribution-link">https://www.gnu.org/software/make/manual/html_node/Parallel-Input.html</a>
  </p>
</div>