Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 250843 | Differences between
and this patch

Collapse All | Expand All

(-)jobs.c.ori (-1 / +10 lines)
Lines 1670-1675 Link Here
1670
{
1670
{
1671
  sigset_t set, oset;
1671
  sigset_t set, oset;
1672
  pid_t pid;
1672
  pid_t pid;
1673
  unsigned int forksleep; 
1673
1674
1674
  sigemptyset (&set);
1675
  sigemptyset (&set);
1675
  sigaddset (&set, SIGCHLD);
1676
  sigaddset (&set, SIGCHLD);
Lines 1690-1697 Link Here
1690
#endif /* BUFFERED_INPUT */
1691
#endif /* BUFFERED_INPUT */
1691
1692
1692
  /* Create the child, handle severe errors. */
1693
  /* Create the child, handle severe errors. */
1693
  if ((pid = fork ()) < 0)
1694
  forksleep = 1;
1695
  while ((pid = fork ()) < 0 && errno == EAGAIN && forksleep < 32)
1694
    {
1696
    {
1697
      if (sleep (forksleep)) break; /* break on signals, e.g. ^C */
1698
      forksleep <<= 1;
1699
    }
1700
1701
  if (pid < 0)
1702
    {
1703
1695
      sys_error ("fork");
1704
      sys_error ("fork");
1696
1705
1697
      /* Kill all of the processes in the current pipeline. */
1706
      /* Kill all of the processes in the current pipeline. */

Return to bug 250843