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:
parent
05565bad58
commit
d8f0dd6f3b
8 changed files with 157 additions and 2 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue