qrexec-daemon: optionally don't wait for connection to the VM

Will be used to keep qrexec-daemon running in the background even if no
qrexec-agent installed (yet). Specifically to give the VM a chance to
inform about just installed agent.
This commit is contained in:
Marek Marczykowski-Górecki 2013-10-23 05:43:37 +02:00
parent aa5635b4f5
commit 19e7663928

View File

@ -147,6 +147,8 @@ void init(int xid)
case 0: case 0:
break; break;
default: default:
if (getenv("QREXEC_STARTUP_NOWAIT"))
exit(0);
fprintf(stderr, "Waiting for VM's qrexec agent."); fprintf(stderr, "Waiting for VM's qrexec agent.");
for (i=0;i<startup_timeout;i++) { for (i=0;i<startup_timeout;i++) {
sleep(1); sleep(1);