- options = dict(close_fds=True, stdin=None, stdout=None, stderr=None,
- preexec_fn=SecureProcess(self, 'var/chroot_pepe', '/home/sercom/build'))
- log.debug(_(u'Ejecutando %s'), ' '.join(self.comando))
+ options = dict(
+ close_fds=True,
+ stdin=None,
+ shell=True,
+ preexec_fn=SecureProcess(self, 'var/chroot_pepe', '/home/sercom/build')
+ )
+ if self.guardar_stdouterr:
+ options['stdout'] = file('/tmp/sercom.tester.%s.stdouterr'
+ % comando_ejecutado.id, 'w') #TODO /var/lib/sercom?
+ options['stderr'] = sp.STDOUT
+ else:
+ if self.guardar_stdout:
+ options['stdout'] = file('/tmp/sercom.tester.%s.stdout'
+ % comando_ejecutado.id, 'w') #TODO /var/lib/sercom?
+ if self.guardar_stderr:
+ options['stderr'] = file('/tmp/sercom.tester.%s.stderr'
+ % comando_ejecutado.id, 'w') #TODO /var/lib/sercom?
+ log.debug(_(u'Ejecutando como root: %s'), self.comando)