1
0
Fork 0

jtag_vpi: Attempt to more aggressively flush the simulator output as it is needed by other listeners

This commit is contained in:
Megan Wachs 2017-05-26 11:48:45 -07:00
parent 618468a06b
commit 0493372027
1 changed files with 4 additions and 0 deletions

View File

@ -78,14 +78,18 @@ int init_jtag_server(int port)
socklen_t socklen = sizeof(serv_addr);
if (getsockname(listenfd, (struct sockaddr *)&serv_addr, &socklen) == -1) {
perror("init_jtag_server");
fflush(stderr);
exit(1);
} else {
printf("Listening on port %d\n", ntohs(serv_addr.sin_port));
fflush(stdout);
}
printf("Waiting for client connection...");
fflush(stdout);
connfd = accept(listenfd, (struct sockaddr*)NULL, NULL);
printf("ok\n");
fflush(stdout);
flags = fcntl(listenfd, F_GETFL, 0);
fcntl(listenfd, F_SETFL, flags | O_NONBLOCK);