~registry/ubuntu/quantal/libdebian-installer/arndale-support

« back to all changes in this revision

Viewing changes to src/exec.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2008-09-02 13:07:03 UTC
  • Revision ID: james.westby@ubuntu.com-20080902130703-d34q4oftuw8r6l0c
Tags: 0.59ubuntu1
* Backport from trunk:
  - Appease the combination of _FORTIFY_SOURCE=2 (used by default on
    Ubuntu) and -Werror. Why exactly glibc demands that fwrite be checked
    but not fputs is beyond me.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 * along with this program; if not, write to the Free Software
18
18
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
19
19
 *
20
 
 * $Id: exec.c 51566 2008-02-25 09:48:59Z waldi $
 
20
 * $Id: exec.c 55491 2008-09-01 22:56:15Z cjwatson $
21
21
 */
22
22
 
23
23
#include <config.h>
60
60
  }
61
61
 
62
62
  for (i = 0; i < pipes; i++)
63
 
    pipe (&fds[i * 2]);
 
63
  {
 
64
    if (pipe (&fds[i * 2]) < 0)
 
65
    {
 
66
      int j;
 
67
      di_log (DI_LOG_LEVEL_WARNING, "pipe failed");
 
68
      for (j = 0; j < i; j++)
 
69
      {
 
70
        close (fds[i * 2]);
 
71
        close (fds[i * 2 + 1]);
 
72
      }
 
73
      return -1;
 
74
    }
 
75
  }
64
76
 
65
77
  pid = fork ();
66
78