mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	add new switch --start to the PA binary which allows starting PA if it is not running yet. In contrast to normal startup an already running PA will not be considered an error. Also, take the autospawn lock so we can guarantee that after this call returns PA is ralive and running
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2513 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									c33db3ce68
								
							
						
					
					
						commit
						ac0f5275c5
					
				
					 5 changed files with 72 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -66,7 +66,8 @@ enum {
 | 
			
		|||
    ARG_DISABLE_SHM,
 | 
			
		||||
    ARG_DUMP_RESAMPLE_METHODS,
 | 
			
		||||
    ARG_SYSTEM,
 | 
			
		||||
    ARG_CLEANUP_SHM
 | 
			
		||||
    ARG_CLEANUP_SHM,
 | 
			
		||||
    ARG_START
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/* Tabel for getopt_long() */
 | 
			
		||||
| 
						 | 
				
			
			@ -91,6 +92,7 @@ static const struct option long_options[] = {
 | 
			
		|||
    {"dl-search-path",              1, 0, ARG_DL_SEARCH_PATH},
 | 
			
		||||
    {"resample-method",             1, 0, ARG_RESAMPLE_METHOD},
 | 
			
		||||
    {"kill",                        0, 0, ARG_KILL},
 | 
			
		||||
    {"start",                       0, 0, ARG_START},
 | 
			
		||||
    {"use-pid-file",                2, 0, ARG_USE_PID_FILE},
 | 
			
		||||
    {"check",                       0, 0, ARG_CHECK},
 | 
			
		||||
    {"system",                      2, 0, ARG_SYSTEM},
 | 
			
		||||
| 
						 | 
				
			
			@ -119,6 +121,7 @@ void pa_cmdline_help(const char *argv0) {
 | 
			
		|||
           "      --dump-modules                    Dump list of available modules\n"
 | 
			
		||||
           "      --dump-resample-methods           Dump available resample methods\n"
 | 
			
		||||
           "      --cleanup-shm                     Cleanup stale shared memory segments\n"
 | 
			
		||||
           "      --start                           Start the daemon if it is not running\n"
 | 
			
		||||
           "  -k  --kill                            Kill a running daemon\n"
 | 
			
		||||
           "      --check                           Check for a running daemon\n\n"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -207,6 +210,11 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d
 | 
			
		|||
                conf->cmd = PA_CMD_KILL;
 | 
			
		||||
                break;
 | 
			
		||||
 | 
			
		||||
            case ARG_START:
 | 
			
		||||
                conf->cmd = PA_CMD_START;
 | 
			
		||||
                conf->daemonize = TRUE;
 | 
			
		||||
                break;
 | 
			
		||||
 | 
			
		||||
            case ARG_CHECK:
 | 
			
		||||
                conf->cmd = PA_CMD_CHECK;
 | 
			
		||||
                break;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue