1 | *** screen.c.orig 2011-04-27 19:56:53.000000000 +0900 |
---|
2 | --- screen.c 2011-07-17 02:08:37.000000000 +0900 |
---|
3 | *************** |
---|
4 | *** 1303,1308 **** |
---|
5 | --- 1303,1317 ---- |
---|
6 | freopen("/dev/null", "w", stderr); |
---|
7 | debug("-- screen.back debug started\n"); |
---|
8 | |
---|
9 | + #ifdef __APPLE__ |
---|
10 | + char* via_ssh = getenv("SSH_TTY"); |
---|
11 | + if (!via_ssh) { |
---|
12 | + if (_vprocmgr_detach_from_console(0) != NULL) { |
---|
13 | + errx(1, "can't detach from console"); |
---|
14 | + } |
---|
15 | + } |
---|
16 | + #endif |
---|
17 | + |
---|
18 | /* |
---|
19 | * This guarantees that the session owner is listed, even when we |
---|
20 | * start detached. From now on we should not refer to 'LoginName' |
---|