/* Asynchronous subprocess control for GNU Emacs.
-Copyright (C) 1985-1988, 1993-1996, 1998-1999, 2001-2015 Free Software
+Copyright (C) 1985-1988, 1993-1996, 1998-1999, 2001-2016 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
#include "coding.h"
#include "process.h"
#include "frame.h"
-#include "termhooks.h"
#include "termopts.h"
-#include "commands.h"
#include "keyboard.h"
#include "blockinput.h"
-#include "dispextern.h"
-#include "composite.h"
#include "atimer.h"
#include "sysselect.h"
#include "syssignal.h"
{
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) sa;
uint16_t *ip6 = (uint16_t *)&sin6->sin6_addr;
- len = sizeof (sin6->sin6_addr) + 1;
+ len = sizeof (sin6->sin6_addr) / 2 + 1;
hostport = XINT (p->contents[--len]);
sin6->sin6_port = htons (hostport);
for (i = 0; i < len; i++)
&& FD_ISSET (channel, &Available))
|| (d->condition & FOR_WRITE
&& FD_ISSET (channel, &write_mask))))
- {
- d->func (channel, d->data);
- FD_CLR (channel, &Available);
- }
+ d->func (channel, d->data);
}
for (channel = 0; channel <= max_process_desc; channel++)
}
DEFUN ("get-buffer-process", Fget_buffer_process, Sget_buffer_process, 1, 1, 0,
- doc: /* Return the (or a) process associated with BUFFER.
-BUFFER may be a buffer or the name of one. */)
+ doc: /* Return the (or a) live process associated with BUFFER.
+BUFFER may be a buffer or the name of one.
+Return nil if all processes associated with BUFFER have been
+deleted or killed. */)
(register Lisp_Object buffer)
{
#ifdef subprocesses