summaryrefslogtreecommitdiff
path: root/misc/dtach/files/patch-master.c
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2016-05-11 14:50:40 +0000
committerMikhail Teterin <mi@FreeBSD.org>2016-05-11 14:50:40 +0000
commit7e53a87279cda29599281acec22d5fcdfb522f7d (patch)
tree20125c9ef601dcbb32dc1900415f352d46d9a6fe /misc/dtach/files/patch-master.c
parentMoscow_ml has been renamed mosml (diff)
Upgrade from 0.8 to 0.9. The change-log can be seen here:
http://dtach.sourceforge.net/ Notified by: portscout
Notes
Notes: svn path=/head/; revision=415000
Diffstat (limited to 'misc/dtach/files/patch-master.c')
-rw-r--r--misc/dtach/files/patch-master.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/misc/dtach/files/patch-master.c b/misc/dtach/files/patch-master.c
index a1674c607d92..acd4b72e9c19 100644
--- a/misc/dtach/files/patch-master.c
+++ b/misc/dtach/files/patch-master.c
@@ -39,27 +39,3 @@
{
close(s);
return -1;
-@@ -454,6 +470,8 @@ master_process(int s, char **argv, int w
- /* Loop forever. */
- while (1)
- {
-+ int has_attached_client = 0;
-+
- /* Re-initialize the file descriptor set for select. */
- FD_ZERO(&readfds);
- FD_SET(s, &readfds);
-@@ -480,8 +498,14 @@ master_process(int s, char **argv, int w
- FD_SET(p->fd, &readfds);
- if (p->fd > highest_fd)
- highest_fd = p->fd;
-+
-+ if (p->attached) {
-+ has_attached_client = 1;
-+ }
- }
-
-+ check_socket_mode(has_attached_client);
-+
- /* Wait for something to happen. */
- if (select(highest_fd + 1, &readfds, NULL, NULL, NULL) < 0)
- {