From c15f544356dfebf6d08887e73fa156d4e70e2bbc Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 20 Jul 2006 12:17:25 +0000 Subject: * Call find-runtime-roots.pl from the garbage collector to prevent running applications etc. from being garbage collected. --- src/libutil/util.hh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/libutil/util.hh') diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 92bdf50d31f7..fcf995af8a30 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -185,6 +185,11 @@ void readFull(int fd, unsigned char * buf, size_t count); void writeFull(int fd, const unsigned char * buf, size_t count); +/* Read a file descriptor until EOF occurs. */ +string drainFD(int fd); + + + /* Automatic cleanup of resources. */ class AutoDelete @@ -249,6 +254,15 @@ public: }; +/* Run a program and return its stdout in a string (i.e., like the + shell backtick operator). */ +string runProgram(Path program); + +/* Wrapper around _exit() on Unix and ExitProcess() on Windows. (On + Cygwin, _exit() doesn't seem to do the right thing.) */ +void quickExit(int status); + + /* User interruption. */ extern volatile sig_atomic_t _isInterrupted; -- cgit 1.4.1