diff options
Diffstat (limited to 'meta/recipes-devtools/pseudo/files/toomanyfiles.patch')
-rw-r--r-- | meta/recipes-devtools/pseudo/files/toomanyfiles.patch | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/meta/recipes-devtools/pseudo/files/toomanyfiles.patch b/meta/recipes-devtools/pseudo/files/toomanyfiles.patch index 7319ab29bf..b085a4505d 100644 --- a/meta/recipes-devtools/pseudo/files/toomanyfiles.patch +++ b/meta/recipes-devtools/pseudo/files/toomanyfiles.patch | |||
@@ -9,7 +9,7 @@ a small risk of data loss here sadly but its better than hanging. | |||
9 | RP | 9 | RP |
10 | 2017/4/25 | 10 | 2017/4/25 |
11 | 11 | ||
12 | Upstream-Status: Pending [Peter is aware of the issue] | 12 | Upstream-Status: Submitted [Peter is aware of the issue] |
13 | 13 | ||
14 | Index: pseudo-1.8.2/pseudo_server.c | 14 | Index: pseudo-1.8.2/pseudo_server.c |
15 | =================================================================== | 15 | =================================================================== |
@@ -31,15 +31,12 @@ Index: pseudo-1.8.2/pseudo_server.c | |||
31 | 31 | ||
32 | pseudo_debug(PDBGF_SERVER, "server loop started.\n"); | 32 | pseudo_debug(PDBGF_SERVER, "server loop started.\n"); |
33 | if (listen_fd < 0) { | 33 | if (listen_fd < 0) { |
34 | @@ -663,10 +665,18 @@ pseudo_server_loop(void) { | 34 | @@ -663,10 +665,15 @@ pseudo_server_loop(void) { |
35 | message_time.tv_usec -= 1000000; | 35 | message_time.tv_usec -= 1000000; |
36 | ++message_time.tv_sec; | 36 | ++message_time.tv_sec; |
37 | } | 37 | } |
38 | + } else if (hitmaxfiles) { | 38 | + } else if (hitmaxfiles) { |
39 | + /* In theory there is a potential race here where if we close a client, | 39 | + /* Only close one per loop iteration in the interests of caution */ |
40 | + it may have sent us a fastop message which we don't act upon. | ||
41 | + If we don't close a filehandle we'll loop indefinitely thought. | ||
42 | + Only close one per loop iteration in the interests of caution */ | ||
43 | + close_client(i); | 40 | + close_client(i); |
44 | + hitmaxfiles = 0; | 41 | + hitmaxfiles = 0; |
45 | } | 42 | } |