Remember that execve()'s argv[0] is the program name
This commit is contained in:
		
							parent
							
								
									4c1a3943bd
								
							
						
					
					
						commit
						67f0ab405a
					
				| 
						 | 
					@ -132,7 +132,7 @@ int main(int argc, char* argv[])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* run process */
 | 
					    /* run process */
 | 
				
			||||||
    while(1) {
 | 
					    while(1) {
 | 
				
			||||||
        run_program(argv[optind] /* path */, argv + optind + 1 /* argv[], null terminated */);
 | 
					        run_program(argv[optind] /* path */, argv + optind /* argv[], null terminated */);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if(restart_interval) {
 | 
					        if(restart_interval) {
 | 
				
			||||||
            LOG(LOG_NOTICE, "Sleeping for %d seconds.", restart_interval);
 | 
					            LOG(LOG_NOTICE, "Sleeping for %d seconds.", restart_interval);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue