summaryrefslogtreecommitdiff
path: root/src/w32proc.c
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2006-07-14 14:18:52 +0000
committerKim F. Storm <storm@cua.dk>2006-07-14 14:18:52 +0000
commitf9125cde75438bba2db30f52910554686bb9f140 (patch)
tree233c1e0e17d296891d9f0f6497db148f15c51f5e /src/w32proc.c
parentc8b6788004fc30da0e8b702b043d3b0e280fdbd6 (diff)
downloademacs-f9125cde75438bba2db30f52910554686bb9f140.tar.gz
(reader_thread): Use _sys_wait_accept to wait on a
server socket (FILE_LISTEN flag).
Diffstat (limited to 'src/w32proc.c')
-rw-r--r--src/w32proc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/w32proc.c b/src/w32proc.c
index a9e0e0cb83f..d874d183b17 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -1,6 +1,6 @@
/* Process support for GNU Emacs on the Microsoft W32 API.
Copyright (C) 1992, 1995, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006 Free Software Foundation, Inc.
+ 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -280,7 +280,10 @@ reader_thread (void *arg)
{
int rc;
- rc = _sys_read_ahead (cp->fd);
+ if (fd_info[cp->fd].flags & FILE_LISTEN)
+ rc = _sys_wait_accept (cp->fd);
+ else
+ rc = _sys_read_ahead (cp->fd);
/* The name char_avail is a misnomer - it really just means the
read-ahead has completed, whether successfully or not. */