summaryrefslogtreecommitdiff
path: root/Userland/sh.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/sh.cpp')
-rw-r--r--Userland/sh.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/sh.cpp b/Userland/sh.cpp
index 264a748cf7..7ad8361153 100644
--- a/Userland/sh.cpp
+++ b/Userland/sh.cpp
@@ -14,6 +14,7 @@ struct GlobalState {
const char* ttyname_short { nullptr };
char ttyname[32];
char hostname[32];
+ pid_t sid;
};
static GlobalState* g;
@@ -171,6 +172,7 @@ static void greeting()
int main(int, char**)
{
g = new GlobalState;
+ g->sid = setsid();
int rc = gethostname(g->hostname, sizeof(g->hostname));
if (rc < 0)
perror("gethostname");