On Thu, Dec 4, 2014, at 09:23 AM, Vratislav Podzimek wrote:
+ # using iutil.execWithRedirect here would mean that if this
function was run
+ # multiple times from multiple threads in the same time, the execution would
+ # be serialized because of the program_log lock
+ proc = subprocess.Popen(["ntpdate", "-q", server],
close_fds=True)
- Why not subprocess.call()? (You should be able to pass close_fds=True to it)
- Is it intentional that you're dropping the equivalent of
stdout=open('/dev/null', 'w'), stderr=subprocess.STDOUT ?
- Also worth mentioning this fixes a bug where if the provided server name had shell
metacharacters it would fail by executing code instead of returning a clean error