about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-11-09T15·42+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-11-09T15·42+0100
commit10dcee99ed62a775c05f34aa70449945d537e1a2 (patch)
tree4b60acb53162cf4145e9a8085f328b3101399443 /src
parent4c9e3fa6412f736ce422f8deb0ba825999b66b0a (diff)
Remove the quickExit function
Diffstat (limited to 'src')
-rw-r--r--src/libstore/build.cc8
-rw-r--r--src/libstore/local-store.cc2
-rw-r--r--src/libutil/util.cc12
-rw-r--r--src/libutil/util.hh4
4 files changed, 8 insertions, 18 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 3a06aa1fca..d1c9f1727e 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -569,7 +569,7 @@ static void runSetuidHelper(const string & command,
         catch (std::exception & e) {
             std::cerr << "error: " << e.what() << std::endl;
         }
-        quickExit(1);
+        _exit(1);
     }
 
     /* Parent. */
@@ -701,7 +701,7 @@ HookInstance::HookInstance()
         } catch (std::exception & e) {
             std::cerr << format("build hook error: %1%") % e.what() << std::endl;
         }
-        quickExit(1);
+        _exit(1);
     }
 
     /* parent */
@@ -2146,7 +2146,7 @@ void DerivationGoal::initChild()
 
     } catch (std::exception & e) {
         std::cerr << format("build error: %1%") % e.what() << std::endl;
-        quickExit(inSetup ? childSetupFailed : 1);
+        _exit(inSetup ? childSetupFailed : 1);
     }
 
     abort(); /* never reached */
@@ -2702,7 +2702,7 @@ void SubstitutionGoal::tryToRun()
         } catch (std::exception & e) {
             std::cerr << format("substitute error: %1%") % e.what() << std::endl;
         }
-        quickExit(1);
+        _exit(1);
     }
 
     /* parent */
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index b69eec614a..bcf367d654 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -981,7 +981,7 @@ void LocalStore::startSubstituter(const Path & substituter, RunningSubstituter &
         } catch (std::exception & e) {
             std::cerr << "error: " << e.what() << std::endl;
         }
-        quickExit(1);
+        _exit(1);
     }
 
     /* Parent. */
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index afb0dc0b2c..bfed968463 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -847,9 +847,9 @@ void killUser(uid_t uid)
         } catch (std::exception & e) {
             std::cerr << format("killing processes belonging to uid `%1%': %2%")
                 % uid % e.what() << std::endl;
-            quickExit(1);
+            _exit(1);
         }
-        quickExit(0);
+        _exit(0);
     }
     
     /* parent */
@@ -905,7 +905,7 @@ string runProgram(Path program, bool searchPath, const Strings & args)
         } catch (std::exception & e) {
             std::cerr << "error: " << e.what() << std::endl;
         }
-        quickExit(1);
+        _exit(1);
     }
 
     /* Parent. */
@@ -944,12 +944,6 @@ void closeOnExec(int fd)
 }
 
 
-void quickExit(int status)
-{
-    _exit(status);
-}
-
-
 void setuidCleanup()
 {
     /* Don't trust the environment. */
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index d3861f730b..0e121ea5c6 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -262,10 +262,6 @@ void closeMostFDs(const set<int> & exceptions);
 /* Set the close-on-exec flag for the given file descriptor. */
 void closeOnExec(int fd);
 
-/* Wrapper around _exit() on Unix and ExitProcess() on Windows.  (On
-   Cygwin, _exit() doesn't seem to do the right thing.) */
-void quickExit(int status);
-
 /* Common initialisation for setuid programs: clear the environment,
    sanitize file handles 0, 1 and 2. */
 void setuidCleanup();