i3bar: Don't start child unless status_command
If a command is passed to `start_child` which is NULL, such as in the case when there is no `status_command` specified in the bar config, do not start a child process to listen on stdin. fixes #1140
This commit is contained in:
committed by
Michael Stapelberg
parent
38b6936c25
commit
ac74a63662
@ -127,10 +127,6 @@ static int config_string_cb(void *params_, const unsigned char *val, unsigned in
|
||||
}
|
||||
|
||||
if (!strcmp(cur_key, "status_command")) {
|
||||
/* We cannot directly start the child here, because start_child() also
|
||||
* needs to be run when no command was specified (to setup stdin).
|
||||
* Therefore we save the command in 'config' and access it later in
|
||||
* got_bar_config() */
|
||||
DLOG("command = %.*s\n", len, val);
|
||||
sasprintf(&config.command, "%.*s", len, val);
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user