diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:53:38 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:53:38 +0000 |
commit | 54676e1a82f400e37879bc931b6db0c13b8ebb3f (patch) | |
tree | cc1a3db8623e9236855361403c5bc805ae6a42f5 /apt-pkg/deb/dpkgpm.cc | |
parent | fb0ee66e0bc8a2ae176d3b10da49fcf31c66b838 (diff) |
Working apt-get source build stuff
Author: jgg
Date: 1999-04-20 05:02:09 GMT
Working apt-get source build stuff
Diffstat (limited to 'apt-pkg/deb/dpkgpm.cc')
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index f8c59d844..478b119cf 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: dpkgpm.cc,v 1.8 1999/03/05 19:36:49 jgg Exp $ +// $Id: dpkgpm.cc,v 1.9 1999/04/20 05:02:09 jgg Exp $ /* ###################################################################### DPKG Package Manager - Provide an interface to dpkg @@ -86,27 +86,14 @@ bool pkgDPkgPM::RunScripts(const char *Cnf) Opts = Opts->Child; // Fork for running the system calls - pid_t Child = fork(); - if (Child < 0) - return _error->Errno("fork","Could't fork"); + pid_t Child = ExecFork(); // This is the child if (Child == 0) { - signal(SIGPIPE,SIG_DFL); - signal(SIGQUIT,SIG_DFL); - signal(SIGINT,SIG_DFL); - signal(SIGWINCH,SIG_DFL); - signal(SIGCONT,SIG_DFL); - signal(SIGTSTP,SIG_DFL); - if (chdir("/tmp/") != 0) _exit(100); - // Close all of our FDs - just in case - for (int K = 3; K != 40; K++) - fcntl(K,F_SETFD,FD_CLOEXEC); - unsigned int Count = 1; for (; Opts != 0; Opts = Opts->Next, Count++) { @@ -250,27 +237,14 @@ bool pkgDPkgPM::Go() signal(SIGINT,SIG_IGN); // Fork dpkg - pid_t Child = fork(); - if (Child < 0) - return _error->Errno("fork","Could't fork"); + pid_t Child = ExecFork(); // This is the child if (Child == 0) { - signal(SIGPIPE,SIG_DFL); - signal(SIGQUIT,SIG_DFL); - signal(SIGINT,SIG_DFL); - signal(SIGWINCH,SIG_DFL); - signal(SIGCONT,SIG_DFL); - signal(SIGTSTP,SIG_DFL); - if (chdir(_config->FindDir("DPkg::Run-Directory","/").c_str()) != 0) _exit(100); - // Close all of our FDs - just in case - for (int K = 3; K != 40; K++) - fcntl(K,F_SETFD,FD_CLOEXEC); - int Flags,dummy; if ((Flags = fcntl(STDIN_FILENO,F_GETFL,dummy)) < 0) _exit(100); |