Start terminal from background instead of session

This commit is contained in:
K. Lange 2018-03-02 19:38:06 +09:00 committed by Kevin Lange
parent e198b36d60
commit 104ece2e1e
2 changed files with 6 additions and 5 deletions

View File

@ -106,6 +106,12 @@ int main (int argc, char ** argv) {
yutani_key_bind(yctx, 't', KEY_MOD_LEFT_CTRL | KEY_MOD_LEFT_ALT, YUTANI_BIND_STEAL);
int _terminal_pid = fork();
if (!_terminal_pid) {
char * args[] = {"/bin/terminal", NULL};
execvp(args[0], args);
}
while (!should_exit) {
yutani_msg_t * m = yutani_poll(yctx);
if (m) {

View File

@ -13,11 +13,6 @@ int main(int argc, char * argv[]) {
char * args[] = {"/bin/background", NULL};
execvp(args[0], args);
}
int _terminal_pid = fork();
if (!_terminal_pid) {
char * args[] = {"/bin/terminal", NULL};
execvp(args[0], args);
}
wait(NULL);