void
add_read_fd (int fd, fd_callback func, void *data)
{
- xassert (fd < MAXDESC);
+ eassert (fd < MAXDESC);
add_keyboard_wait_descriptor (fd);
fd_callback_info[fd].func = func;
void
delete_read_fd (int fd)
{
- xassert (fd < MAXDESC);
+ eassert (fd < MAXDESC);
delete_keyboard_wait_descriptor (fd);
fd_callback_info[fd].condition &= ~FOR_READ;
void
add_write_fd (int fd, fd_callback func, void *data)
{
- xassert (fd < MAXDESC);
+ eassert (fd < MAXDESC);
FD_SET (fd, &write_mask);
if (fd > max_input_desc)
max_input_desc = fd;
{
int lim = max_input_desc;
- xassert (fd < MAXDESC);
+ eassert (fd < MAXDESC);
FD_CLR (fd, &write_mask);
fd_callback_info[fd].condition &= ~FOR_WRITE;
if (fd_callback_info[fd].condition == 0)
printmax_t i;
p = allocate_process ();
-
- p->infd = -1;
- p->outfd = -1;
- p->tick = 0;
- p->update_tick = 0;
- p->pid = 0;
- p->pty_flag = 0;
- p->raw_status_new = 0;
+ /* Initialize Lisp data. Note that allocate_process initializes all
+ Lisp data to nil, so do it only for slots which should not be nil. */
p->status = Qrun;
p->mark = Fmake_marker ();
- p->kill_without_query = 0;
- p->write_queue = Qnil;
-#ifdef ADAPTIVE_READ_BUFFERING
- p->adaptive_read_buffering = 0;
- p->read_output_delay = 0;
- p->read_output_skip = 0;
-#endif
+ /* Initialize non-Lisp data. Note that allocate_process zeroes out all
+ non-Lisp data, so do it only for slots which should not be zero. */
+ p->infd = -1;
+ p->outfd = -1;
#ifdef HAVE_GNUTLS
p->gnutls_initstage = GNUTLS_STAGE_EMPTY;
- /* Default log level. */
- p->gnutls_log_level = 0;
- /* GnuTLS handshakes attempted for this connection. */
- p->gnutls_handshakes_tried = 0;
- p->gnutls_p = 0;
- p->gnutls_state = NULL;
- p->gnutls_x509_cred = NULL;
- p->gnutls_anon_cred = NULL;
#endif
/* If name is already in use, modify it until it is unused. */
an additional duration to wait, measured in nanoseconds
If TIME_LIMIT is zero, then:
If NSECS == 0, there is no limit.
- If NSECS > 0, the timeout consists of NSEC only.
+ If NSECS > 0, the timeout consists of NSECS only.
If NSECS < 0, gobble data immediately, as if TIME_LIMIT were negative.
READ_KBD is a lisp value:
Wait for timeout to elapse and/or keyboard input to be available.
- time_limit is:
+ TIME_LIMIT is:
timeout in seconds
If negative, gobble data immediately available but don't wait for any.
- nsec is:
+ NSECS is:
an additional duration to wait, measured in nanoseconds
If TIME_LIMIT is zero, then:
- If NSEC == 0, there is no limit.
- If NSEC > 0, the timeout consists of NSEC only.
+ If NSECS == 0, there is no limit.
+ If NSECS > 0, the timeout consists of NSECS only.
If NSECS < 0, gobble data immediately, as if TIME_LIMIT were negative.
- read_kbd is a Lisp_Object:
+ READ_KBD is a Lisp_Object:
0 to ignore keyboard input, or
1 to return when input is available, or
-1 means caller will actually read the input, so don't throw to
see full version for other parameters. We know that wait_proc will
always be NULL, since `subprocesses' isn't defined.
- do_display != 0 means redisplay should be done to show subprocess
+ DO_DISPLAY != 0 means redisplay should be done to show subprocess
output that arrives.
Return true if we received input from any process. */