Handle execvp error when opening dmenu
The execvp function usually doesn't return and exits by itself. But, when having an error, it returns. A faulty dmenu setting could trigger this and stop dunst receiving signals.
This commit is contained in:
		
							parent
							
								
									87c0fd4d90
								
							
						
					
					
						commit
						7bfb0b9b5f
					
				| @ -243,6 +243,10 @@ void context_menu(void) | ||||
|                         exit(EXIT_FAILURE); | ||||
|                 } | ||||
|                 execvp(settings.dmenu_cmd[0], settings.dmenu_cmd); | ||||
|                 fprintf(stderr, "Warning: failed to execute '%s': %s\n", | ||||
|                                 settings.dmenu, | ||||
|                                 strerror(errno)); | ||||
|                 exit(EXIT_FAILURE); | ||||
|         } else { | ||||
|                 close(child_io[0]); | ||||
|                 close(parent_io[1]); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Benedikt Heine
						Benedikt Heine