mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
updated for version 7.3.096
Problem: "gvim -nb" is not interruptable. Leaking file descriptor on netbeans connection error. Solution: Check for CTRL-C typed. Free file descriptor. (Xavier de Gaye)
This commit is contained in:
@@ -321,6 +321,7 @@ netbeans_connect(char *params, int doabort)
|
|||||||
{
|
{
|
||||||
nbdebug(("error in gethostbyname() in netbeans_connect()\n"));
|
nbdebug(("error in gethostbyname() in netbeans_connect()\n"));
|
||||||
PERROR("gethostbyname() in netbeans_connect()");
|
PERROR("gethostbyname() in netbeans_connect()");
|
||||||
|
sock_close(sd);
|
||||||
goto theend;
|
goto theend;
|
||||||
}
|
}
|
||||||
memcpy((char *)&server.sin_addr, host->h_addr, host->h_length);
|
memcpy((char *)&server.sin_addr, host->h_addr, host->h_length);
|
||||||
@@ -370,16 +371,13 @@ netbeans_connect(char *params, int doabort)
|
|||||||
|| (errno == EINTR)))
|
|| (errno == EINTR)))
|
||||||
{
|
{
|
||||||
nbdebug(("retrying...\n"));
|
nbdebug(("retrying...\n"));
|
||||||
sleep(5);
|
mch_delay(3000L, TRUE);
|
||||||
if (!doabort)
|
|
||||||
{
|
|
||||||
ui_breakcheck();
|
ui_breakcheck();
|
||||||
if (got_int)
|
if (got_int)
|
||||||
{
|
{
|
||||||
errno = EINTR;
|
errno = EINTR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (connect(sd, (struct sockaddr *)&server,
|
if (connect(sd, (struct sockaddr *)&server,
|
||||||
sizeof(server)) == 0)
|
sizeof(server)) == 0)
|
||||||
{
|
{
|
||||||
@@ -393,6 +391,7 @@ netbeans_connect(char *params, int doabort)
|
|||||||
/* Get here when the server can't be found. */
|
/* Get here when the server can't be found. */
|
||||||
nbdebug(("Cannot connect to Netbeans #2\n"));
|
nbdebug(("Cannot connect to Netbeans #2\n"));
|
||||||
PERROR(_("Cannot connect to Netbeans #2"));
|
PERROR(_("Cannot connect to Netbeans #2"));
|
||||||
|
sock_close(sd);
|
||||||
if (doabort)
|
if (doabort)
|
||||||
getout(1);
|
getout(1);
|
||||||
goto theend;
|
goto theend;
|
||||||
@@ -403,6 +402,7 @@ netbeans_connect(char *params, int doabort)
|
|||||||
{
|
{
|
||||||
nbdebug(("Cannot connect to Netbeans\n"));
|
nbdebug(("Cannot connect to Netbeans\n"));
|
||||||
PERROR(_("Cannot connect to Netbeans"));
|
PERROR(_("Cannot connect to Netbeans"));
|
||||||
|
sock_close(sd);
|
||||||
if (doabort)
|
if (doabort)
|
||||||
getout(1);
|
getout(1);
|
||||||
goto theend;
|
goto theend;
|
||||||
|
@@ -714,6 +714,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
96,
|
||||||
/**/
|
/**/
|
||||||
95,
|
95,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user