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) ...@@ -763,11 +763,11 @@ mta_smtp (int argc, char **argv)
763 status = bind (fd, (struct sockaddr *) &address, sizeof (address)); 763 status = bind (fd, (struct sockaddr *) &address, sizeof (address));
764 } 764 }
765 while (status < 0); 765 while (status < 0);
766 printf ("%d\n", port);
767 fclose (stdout);
768 } 766 }
769 767
770 listen (fd, 5); 768 listen (fd, 5);
769 printf ("%d\n", port);
770 fclose (stdout);
771 while (1) 771 while (1)
772 { 772 {
773 fd_set rfds; 773 fd_set rfds;
......