* nix-worker: clean up the temporary root for the worker processes
in /nix/var/nix/temproots.
This commit is contained in:
		
							parent
							
								
									94fd46fa1c
								
							
						
					
					
						commit
						f351834f77
					
				
					 3 changed files with 13 additions and 9 deletions
				
			
		|  | @ -70,15 +70,6 @@ static unsigned int getIntArg(const string & opt, | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| struct RemoveTempRoots  |  | ||||||
| { |  | ||||||
|     ~RemoveTempRoots() |  | ||||||
|     { |  | ||||||
|         removeTempRoots(); |  | ||||||
|     } |  | ||||||
| }; |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| void initDerivationsHelpers(); | void initDerivationsHelpers(); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @ -99,6 +90,12 @@ static void closeStore() | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | RemoveTempRoots::~RemoveTempRoots() | ||||||
|  | { | ||||||
|  |     removeTempRoots(); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| /* Initialize and reorder arguments, then call the actual argument
 | /* Initialize and reorder arguments, then call the actual argument
 | ||||||
|    processor. */ |    processor. */ | ||||||
| static void initAndRun(int argc, char * * argv) | static void initAndRun(int argc, char * * argv) | ||||||
|  |  | ||||||
|  | @ -33,6 +33,11 @@ extern volatile ::sig_atomic_t blockInt; | ||||||
| 
 | 
 | ||||||
| MakeError(UsageError, nix::Error); | MakeError(UsageError, nix::Error); | ||||||
| 
 | 
 | ||||||
|  | struct RemoveTempRoots  | ||||||
|  | { | ||||||
|  |     ~RemoveTempRoots();     | ||||||
|  | }; | ||||||
|  | 
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -439,6 +439,8 @@ static void performOp(unsigned int clientVersion, | ||||||
| 
 | 
 | ||||||
| static void processConnection() | static void processConnection() | ||||||
| { | { | ||||||
|  |     RemoveTempRoots removeTempRoots; /* unused variable - don't remove */ | ||||||
|  | 
 | ||||||
|     canSendStderr = false; |     canSendStderr = false; | ||||||
|     myPid = getpid();     |     myPid = getpid();     | ||||||
|     writeToStderr = tunnelStderr; |     writeToStderr = tunnelStderr; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue