1 diff -up wlassistant-0.5.7/src/watools.cpp.BAD wlassistant-0.5.7/src/watools.cpp
2 --- wlassistant-0.5.7/src/watools.cpp.BAD 2007-07-23 10:13:15.000000000 -0500
3 +++ wlassistant-0.5.7/src/watools.cpp 2007-07-23 10:16:48.000000000 -0500
5 #include <unistd.h> //provides readlink
7 #include <stdio.h> //to get values from /sys
10 #include <sys/socket.h>
11 #include <arpa/inet.h> //inet_ntoa
12 @@ -178,6 +179,13 @@ int WATools::availableNetworks( const ch
15 iw_socket = iw_sockets_open(); //get kernel socket
17 + flags = fcntl(iw_socket, F_GETFD);
20 + flags |= FD_CLOEXEC;
21 + if (fcntl(iw_socket, F_SETFD, flags) == -1)
26 @@ -264,6 +272,13 @@ int WATools::doRequest( int request, str
29 iw_socket = iw_sockets_open(); //get kernel socket
31 + flags = fcntl(iw_socket, F_GETFD);
34 + flags |= FD_CLOEXEC;
35 + if (fcntl(iw_socket, F_SETFD, flags) == -1)
40 @@ -278,6 +293,13 @@ int WATools::doWirelessRequest( int requ
43 iw_socket = iw_sockets_open(); //get kernel socket
45 + flags = fcntl(iw_socket, F_GETFD);
48 + flags |= FD_CLOEXEC;
49 + if (fcntl(iw_socket, F_SETFD, flags) == -1)
54 @@ -292,6 +314,13 @@ int WATools::doWirelessStatisticsRequest
57 iw_socket = iw_sockets_open();//get kernel socket
59 + flags = fcntl(iw_socket, F_GETFD);
62 + flags |= FD_CLOEXEC;
63 + if (fcntl(iw_socket, F_SETFD, flags) == -1)