blob: 7cc0e546383d60bb80797b53834c9c66ec64dc19 [file] [log] [blame]
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Locking, timeout, and other process management functions."""
from ._daemon_nix import (
become_daemon,
close_all_fds,
flock,
LockAlreadyLocked,
)
def add_timeout(cmd, timeout_secs):
"""Adds a timeout to a command using linux's (gnu) /bin/timeout."""
return ['timeout', str(timeout_secs)] + cmd