mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	src/main.c: use spawn_async_no_shell()
This commit is contained in:
		
							parent
							
								
									75594d81b7
								
							
						
					
					
						commit
						786ee4d455
					
				
					 1 changed files with 3 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -1,5 +1,6 @@
 | 
			
		|||
#include "labwc.h"
 | 
			
		||||
#include "theme.h"
 | 
			
		||||
#include "spawn.h"
 | 
			
		||||
 | 
			
		||||
struct server server = { 0 };
 | 
			
		||||
struct rcxml rc = { 0 };
 | 
			
		||||
| 
						 | 
				
			
			@ -40,12 +41,8 @@ int main(int argc, char *argv[])
 | 
			
		|||
	server_init(&server);
 | 
			
		||||
	server_start(&server);
 | 
			
		||||
 | 
			
		||||
	if (startup_cmd) {
 | 
			
		||||
		if (fork() == 0) {
 | 
			
		||||
			execl("/bin/sh", "/bin/sh", "-c", startup_cmd,
 | 
			
		||||
			      (void *)NULL);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	if (startup_cmd)
 | 
			
		||||
		spawn_async_no_shell(startup_cmd);
 | 
			
		||||
	wl_display_run(server.wl_display);
 | 
			
		||||
	server_finish(&server);
 | 
			
		||||
	return 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue