From 9b41534daaab98049ae4a2a0e12467ba9ea114d2 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 19 May 2017 15:57:58 +0100 Subject: [PATCH] Make the linux timeout even more generous still * It's not too bad to wait a while since we have a progress bar that will pop up if the operation takes a while. --- renderdoc/os/posix/linux/linux_process.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/renderdoc/os/posix/linux/linux_process.cpp b/renderdoc/os/posix/linux/linux_process.cpp index 2bf44b6e8..0c3420635 100644 --- a/renderdoc/os/posix/linux/linux_process.cpp +++ b/renderdoc/os/posix/linux/linux_process.cpp @@ -28,7 +28,7 @@ extern char **environ; #define INITIAL_WAIT_TIME 1000 -#define MAX_WAIT_TIME 64000 +#define MAX_WAIT_TIME 128000 char **GetCurrentEnvironment() { @@ -42,15 +42,13 @@ int GetIdentPort(pid_t childPid) string procfile = StringFormat::Fmt("/proc/%d/net/tcp", (int)childPid); int waitTime = INITIAL_WAIT_TIME; - int totalWaitTime = 0; // try for a little while for the /proc entry to appear - while(totalWaitTime <= MAX_WAIT_TIME) + while(waitTime <= MAX_WAIT_TIME) { // back-off for each retry usleep(waitTime); - totalWaitTime += waitTime; waitTime *= 2; FILE *f = FileIO::fopen(procfile.c_str(), "r");