qrexec_daemon: print dots when waiting for agent

This commit is contained in:
Rafal Wojtczuk 2011-03-31 11:23:44 +02:00
parent d6bdb85883
commit b7698de251

View File

@ -53,6 +53,7 @@ int server_fd;
void handle_usr1(int x) void handle_usr1(int x)
{ {
fprintf(stderr, "connected\n");
exit(0); exit(0);
} }
@ -77,7 +78,11 @@ void init(int xid)
case 0: case 0:
break; break;
default: default:
pause(); fprintf(stderr, "Waiting for VM's qrexec agent.");
for (;;) {
sleep(1);
fprintf(stderr, ".");
}
exit(0); exit(0);
} }
close(0); close(0);
@ -126,9 +131,9 @@ void flush_client(int fd)
{ {
int i; int i;
struct server_header s_hdr; struct server_header s_hdr;
if (fork_and_flush_stdin(fd, &clients[fd].buffer)) if (fork_and_flush_stdin(fd, &clients[fd].buffer))
children_count++; children_count++;
close(fd); close(fd);
clients[fd].state = CLIENT_INVALID; clients[fd].state = CLIENT_INVALID;
buffer_free(&clients[fd].buffer); buffer_free(&clients[fd].buffer);