1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:07:35 +00:00

Start working on sessions and process groups.

This commit is contained in:
Andreas Kling 2018-11-02 12:56:51 +01:00
parent 05565bad58
commit d8f0dd6f3b
8 changed files with 157 additions and 2 deletions

View file

@ -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");