ecore: use new API eina_file_close_on_exec in example too.

This commit is contained in:
Cedric BAIL 2017-04-18 16:57:36 -07:00
parent 0b833586d6
commit c4dae329e8
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ tcp_connect(void)
/* sets some fd options such as nonblock */
sd = socket(AF_INET, SOCK_STREAM, 0);
fcntl(sd, F_SETFL, O_NONBLOCK);
fcntl(sd, F_SETFD, FD_CLOEXEC);
eina_file_close_on_exec(sd, EINA_TRUE);
setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, (const void *)&curstate, sizeof(curstate));
setsockopt(sd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(int));