try to fix stdout broken pipe
This commit is contained in:
		
							parent
							
								
									e310ffc4e2
								
							
						
					
					
						commit
						0067bd36b5
					
				
					 2 changed files with 9 additions and 8 deletions
				
			
		|  | @ -60,3 +60,12 @@ def onionr_main(): | |||
| 
 | ||||
| if __name__ == "__main__": | ||||
|     onionr_main() | ||||
| 
 | ||||
|     try: | ||||
|         sys.stderr.close() | ||||
|     except (IOError, BrokenPipeError) as e: | ||||
|         pass | ||||
|     try: | ||||
|         sys.stdout.close() | ||||
|     except (IOError, BrokenPipeError) as e: | ||||
|         pass | ||||
|  |  | |||
|  | @ -114,14 +114,6 @@ def daemon(): | |||
|     except KeyboardInterrupt: | ||||
|         pass | ||||
|     cleanup.delete_run_files() | ||||
|     try: | ||||
|         sys.stderr.close() | ||||
|     except (IOError, BrokenPipeError) as e: | ||||
|         pass | ||||
|     try: | ||||
|         sys.stdout.close() | ||||
|     except (IOError, BrokenPipeError) as e: | ||||
|         pass | ||||
| 
 | ||||
| def _ignore_sigint(sig, frame): | ||||
|     '''This space intentionally left blank''' | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue