Initial set of changes working to make fish robust against running out of file descriptors

This commit is contained in:
ridiculousfish
2013-01-30 02:22:38 -08:00
parent ea8c6bc15e
commit 1879dc4b59
10 changed files with 181 additions and 83 deletions

View File

@@ -80,7 +80,7 @@ static int is_dead()
static int try_get_socket_once(void)
{
int s, len;
int s;
wchar_t *wdir;
wchar_t *wuname;
@@ -128,7 +128,6 @@ static int try_get_socket_once(void)
struct sockaddr_un local = {};
local.sun_family = AF_UNIX;
strncpy(local.sun_path, name.c_str(), (sizeof local.sun_path) - 1);
len = sizeof(local);
if (connect(s, (struct sockaddr *)&local, sizeof local) == -1)
{