diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-07-20 12:17:25 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-07-20 12:17:25 +0000 |
commit | c15f544356dfebf6d08887e73fa156d4e70e2bbc (patch) | |
tree | fad9d05cb72330af8e96538e160d896b54fd0ca0 /src/libutil/util.hh | |
parent | ebcccbd3581d34d7fefb975c0255a39a3e39e122 (diff) |
* Call find-runtime-roots.pl from the garbage collector to prevent
running applications etc. from being garbage collected.
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r-- | src/libutil/util.hh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 92bdf50d3..fcf995af8 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; |