Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
#include "tty.h"
#include "ctlseqs.h"
#include "settings.h"

// this is probably most likely always going to be "-c" but just in case..
#define SHELL_EVAL_FLAG "-c"

void sleep_forever(bool hangup); // nnn where do these decs go...

static Fd master_fd;
Expand Down Expand Up @@ -85,8 +89,14 @@ static void execsh(void) {
signal(SIGQUIT, SIG_DFL);
signal(SIGTERM, SIG_DFL);
signal(SIGALRM, SIG_DFL);

execvp(sh, (char*[]){sh, NULL});

char* eval = getenv("LAUNCH_12TERM");

if (eval == NULL) {
execvp(sh, (char*[]){sh, NULL});
} else {
execvp(sh, (char*[]){sh, SHELL_EVAL_FLAG, eval, NULL});
}
}

// I don't use openbsd so I can't confirm whether these pledge calls are correct.
Expand Down