[pyar] os.fork()+sys.exit() en UnitTests

Marcos Dione mdione en grulic.org.ar
Vie Ene 10 19:45:17 ART 2014

On Fri, Jan 10, 2014 at 11:38:10PM +0100, Marcos Dione wrote:
>     r= os.fork ()
>         if r==0:
>             try:
>                 os.execvpe (cmd, args, self.options['_env'])
>             except OSError:
>                 sys.exit (127)
>         else:
>             self.exit_code= os.waitpid (child_pid, 0)[1]
>             if runner.options.get ('errexit', False) and self.exit_code==127:
>                 raise CommandFailed (self)

    perdón, el código es un pastiche del real, s/child_pid/r/.

(Not so) Random fortune:
Unix: everything is a file.
Linux: everything is a filesystem.
KDE: everything is a protocol.

More information about the pyar mailing list