From 3a2bbe7f8ad7ec8b2896ff5e666b8f5525691c6f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 28 Mar 2009 19:29:55 +0000 Subject: * Simplify communication with the hook a bit (don't use file descriptors 3/4, just use stdin/stderr). --- src/libutil/util.hh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libutil/util.hh') diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 33b06ca955df..5744e5692280 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -60,6 +60,12 @@ string readFile(const Path & path); /* Write a string to a file. */ void writeFile(const Path & path, const string & s); +/* Read a line from a file descriptor. */ +string readLine(int fd); + +/* Write a line to a file descriptor. */ +void writeLine(int fd, string s); + /* Compute the sum of the sizes of all files in `path'. */ void computePathSize(const Path & path, unsigned long long & bytes, unsigned long long & blocks); -- cgit 1.4.1