about summary refs log tree commit diff
path: root/src/libutil
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-12-11T14·30+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-12-11T14·30+0000
commit07cdfb09fb74cf8e1c3c70c070ad20b5d1119fcf (patch)
treee17b07dfb5eb9861fe2df2f9f7c5247c4244bc8d /src/libutil
parenta0766eca270390c2181c7f31f27f93629b19f4a5 (diff)
* Open the connection to the daemon lazily (on demand) so that
  read-only operations (like nix-env -qa) work properly when the
  daemon isn't running.

Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/serialise.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/serialise.hh b/src/libutil/serialise.hh
index 5746c3c2fcf9..6a74c4cf6ea1 100644
--- a/src/libutil/serialise.hh
+++ b/src/libutil/serialise.hh
@@ -35,7 +35,7 @@ struct FdSink : Sink
 
     FdSink()
     {
-        fd = 0;
+        fd = -1;
     }
     
     FdSink(int fd) 
@@ -54,7 +54,7 @@ struct FdSource : Source
 
     FdSource()
     {
-        fd = 0;
+        fd = -1;
     }
     
     FdSource(int fd)