|
Lines 572-580
ddxProcessArgument(int argc, char *argv[], int i)
Link Here
|
| 572 |
|
572 |
|
| 573 |
if (strcmp(argv[i], "-inetd") == 0) |
573 |
if (strcmp(argv[i], "-inetd") == 0) |
| 574 |
{ |
574 |
{ |
|
|
575 |
int nullfd; |
| 576 |
|
| 575 |
dup2(0,3); |
577 |
dup2(0,3); |
| 576 |
vncInetdSock = 3; |
578 |
vncInetdSock = 3; |
| 577 |
close(2); |
579 |
|
|
|
580 |
/* Avoid xserver >= 1.19's epoll-fd becoming fd 2 / stderr only to be |
| 581 |
replaced by /dev/null by OsInit() because the pollfd is not |
| 582 |
writable, breaking ospoll_wait(). */ |
| 583 |
nullfd = open("/dev/null", O_WRONLY); |
| 584 |
dup2(nullfd, 2); |
| 585 |
close(nullfd); |
| 578 |
|
586 |
|
| 579 |
if (!displaySpecified) { |
587 |
if (!displaySpecified) { |
| 580 |
int port = vncGetSocketPort(vncInetdSock); |
588 |
int port = vncGetSocketPort(vncInetdSock); |