def __call__(self, *args, **kwargs):
tries = <NUM_LIT:0><EOL>while True:<EOL><INDENT>try:<EOL><INDENT>proc = subprocess.Popen(*args, **kwargs)<EOL><DEDENT>except OSError as e:<EOL><INDENT>if e.errno == errno.ENOMEM:<EOL><INDENT>should_retry = (self.max_tries is not None and<EOL>tries >= self.max_tries)<EOL>if should_retry:<EOL><INDENT>raise<EOL><DEDENT>gevent.sleep(self.sleep_time)<EOL>tries += <NUM_LIT:1><EOL>continue<EOL><DEDENT>raise<EOL><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>return proc<EOL>
Call Popen, but be persistent in the face of ENOMEM.

        The utility of this is that on systems with overcommit off,
        the momentary spike in committed virtual memory from fork()
        can be large, but is cleared soon thereafter because
        'subprocess' uses an 'exec' system call.  Without retrying,
        the the backup process would lose all its progress
        immediately with no recourse, which is undesirable.

        Because the ENOMEM error happens on fork() before any
        meaningful work can be done, one thinks this retry would be
        safe, and without side effects.  Because fork is being
        called through 'subprocess' and not directly here, this
        program has to rely on the semantics of the exceptions
        raised from 'subprocess' to avoid retries in unrelated
        scenarios, which could be dangerous.