| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Locking, timeout, and other process management functions.""" | 5 """Locking, timeout, and other process management functions.""" |
| 6 | 6 |
| 7 from ._daemon_nix import ( | 7 from ._daemon_nix import ( |
| 8 become_daemon, | 8 become_daemon, |
| 9 close_all_fds, |
| 9 flock, | 10 flock, |
| 10 LockAlreadyLocked, | 11 LockAlreadyLocked, |
| 11 ) | 12 ) |
| 12 | 13 |
| 13 | 14 |
| 14 def add_timeout(cmd, timeout_secs): | 15 def add_timeout(cmd, timeout_secs): |
| 15 """Adds a timeout to a command using linux's (gnu) /bin/timeout.""" | 16 """Adds a timeout to a command using linux's (gnu) /bin/timeout.""" |
| 16 return ['timeout', str(timeout_secs)] + cmd | 17 return ['timeout', str(timeout_secs)] + cmd |
| OLD | NEW |