about summary refs log tree commit diff
path: root/src/libmain/shared.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2012-03-05T18·19+0100
committerEelco Dolstra <e.dolstra@tudelft.nl>2012-03-05T18·19+0100
commit1d487dc6a682468ae00402b3720ff412b6bfb6fc (patch)
tree94311d8c9b57893255bf613be84fb1cc8b924f55 /src/libmain/shared.cc
parent2b4964f31979b5227a7a51b646d2e4bbb5ef6579 (diff)
nix-worker: put the pid of the caller in argv[1]
This is useful for debugging.
Diffstat (limited to 'src/libmain/shared.cc')
-rw-r--r--src/libmain/shared.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index d3b73f8fd5a3..99ac198ca356 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -287,7 +287,7 @@ static void * oomHandler(size_t requested)
 
 
 int exitCode = 0;
-
+char * * argvSaved = 0;
 
 }
 
@@ -298,6 +298,8 @@ int main(int argc, char * * argv)
 {
     using namespace nix;
 
+    argvSaved = argv;
+
     /* If we're setuid, then we need to take some security precautions
        right away. */
     if (argc == 0) abort();