Chromium Code Reviews| Index: remoting/host/linux/linux_me2me_host.py |
| diff --git a/remoting/host/linux/linux_me2me_host.py b/remoting/host/linux/linux_me2me_host.py |
| index a40063bf470105b1338d0d97c3d1ba62005d878a..109ad6bf299e4b32d28be4f738670b4e815dc215 100755 |
| --- a/remoting/host/linux/linux_me2me_host.py |
| +++ b/remoting/host/linux/linux_me2me_host.py |
| @@ -862,11 +862,11 @@ class ParentProcessLogger(object): |
| false otherwise. |
| """ |
| # If Ctrl-C is pressed, inform the user that the daemon is still running. |
| - # This signal will cause the read loop below to stop with an EINTR IOError. |
| def sigint_handler(signum, frame): |
| _ = signum, frame |
| print("Interrupted. The daemon is still running in the background.", |
| file=sys.stderr) |
| + sys.exit(1) |
| signal.signal(signal.SIGINT, sigint_handler) |
| @@ -889,18 +889,13 @@ class ParentProcessLogger(object): |
| # Print lines as they're logged to the pipe until EOF is reached or readline |
| # is interrupted by one of the signal handlers above. |
| host_ready = False |
| - try: |
| - for line in iter(self._read_file.readline, ''): |
| - if line[:4] == "MSG:": |
| - sys.stderr.write(line[4:]) |
| - elif line == "READY\n": |
| - host_ready = True |
| - else: |
| - sys.stderr.write("Unrecognized command: " + line) |
| - except IOError as e: |
| - if e.errno != errno.EINTR: |
| - raise |
| - print("Log file: %s" % os.environ[LOG_FILE_ENV_VAR], file=sys.stderr) |
|
Lambros
2016/11/29 18:47:58
Did you intend to remove this line? This will no l
Sergey Ulanov
2016/11/29 19:40:23
Added it back now. The daemon process also prints
|
| + for line in iter(self._read_file.readline, ''): |
| + if line[:4] == "MSG:": |
| + sys.stderr.write(line[4:]) |
| + elif line == "READY\n": |
| + host_ready = True |
| + else: |
| + sys.stderr.write("Unrecognized command: " + line) |
| return host_ready |
| @staticmethod |