Commit 5e5ad1bb 5e5ad1bb219f69ed240e42bd05dfd6793c7e9bac by Sergey Poznyakoff

(mta_smtp): Fixed race condition between printing

the port number, which will be used by the testsuite, and actually
starting to listen on that port.
1 parent b85b02d7
......@@ -763,11 +763,11 @@ mta_smtp (int argc, char **argv)
status = bind (fd, (struct sockaddr *) &address, sizeof (address));
}
while (status < 0);
printf ("%d\n", port);
fclose (stdout);
}
listen (fd, 5);
printf ("%d\n", port);
fclose (stdout);
while (1)
{
fd_set rfds;
......