aboutsummaryrefslogtreecommitdiffstats
path: root/src/jalv_console.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-02-18 18:00:03 +0100
committerDavid Robillard <d@drobilla.net>2017-02-18 18:00:03 +0100
commit3a46e861b5b8dbbacb8dd1cec9fa2c69a10b26e0 (patch)
treec4a2ac344e71132eb81306a84bfb1b6d762547ac /src/jalv_console.c
parentdfb2415e7a8f36ef7ff635d7410dc83d391eaf26 (diff)
downloadjalv-3a46e861b5b8dbbacb8dd1cec9fa2c69a10b26e0.tar.gz
jalv-3a46e861b5b8dbbacb8dd1cec9fa2c69a10b26e0.tar.bz2
jalv-3a46e861b5b8dbbacb8dd1cec9fa2c69a10b26e0.zip
Add jalv -i option to ignore stdin for background use
Diffstat (limited to 'src/jalv_console.c')
-rw-r--r--src/jalv_console.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/jalv_console.c b/src/jalv_console.c
index c0f369c..e0e114b 100644
--- a/src/jalv_console.c
+++ b/src/jalv_console.c
@@ -106,6 +106,8 @@ jalv_init(int* argc, char*** argv, JalvOptions* opts)
opts->controls, (++n_controls + 1) * sizeof(char*));
opts->controls[n_controls - 1] = (*argv)[a];
opts->controls[n_controls] = NULL;
+ } else if ((*argv)[a][1] == 'i') {
+ opts->non_interactive = true;
} else if ((*argv)[a][1] == 'd') {
opts->dump = true;
} else if ((*argv)[a][1] == 't') {
@@ -191,7 +193,7 @@ jalv_open_ui(Jalv* jalv)
show_iface->hide(suil_instance_get_handle(jalv->ui_instance));
- } else {
+ } else if (!jalv->opts.non_interactive) {
// Primitive command prompt for setting control values
while (!zix_sem_try_wait(jalv->done)) {
char line[128];
@@ -202,6 +204,8 @@ jalv_open_ui(Jalv* jalv)
break;
}
}
+ } else {
+ zix_sem_wait(jalv->done);
}
// Caller waits on the done sem, so increment it again to exit