I'm working with this GUI application, GTKWave, that has a startup script, gtkwave, which I've added to my system path. At the very end of said script, there is this line:
$EXEC "$bundle_contents/MacOS/$name-bin" $* $EXTRA_ARGS
where $EXEC=exec
My problem is that given how exec works, my terminal is "hijacked" by the GUI process, meaning I can't run any more commands until I close the window, which is not ideal.
I currently got around this by putting this function in my .bash_profile:
function run-gtkwave ( ) { nohup gtkwave $1 &>/dev/null & }
While this works, it makes it hard to pass arguments to gtkwave. Ideally, I could do a form right before that exec command, but I'm not sure how to do that in bash. I know that the & character should do that, but
$EXEC "$bundle_contents/MacOS/$name-bin" $* $EXTRA_ARGS &
doesn't cut it, and neither does
"$bundle_contents/MacOS/$name-bin" $* $EXTRA_ARGS &
or
("$bundle_contents/MacOS/$name-bin" $* $EXTRA_ARGS) &
How do I modify this line to run the application in its own process?