Commit bc6f8b99 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Run star without fifo, to ensure correct termination

parent 2aaad6fa
......@@ -55,15 +55,13 @@ class Backup:
self.trash_root = os.path.join(mount, 'TRASH').encode('utf-8')
self.trash = os.path.join(self.trash_root,
str(int(time.time())).encode('utf-8'))
extract_cmd = [ '/bin/star', '-x', '-nowarn', '-no-statistics' ]
try:
self.extract = subprocess.Popen(extract_cmd,
cwd=os.path.join(mount, path),
stdin=self.primary_out)
atexit.register(cond_kill, self.extract)
except:
print('EXIT', file=sys.stderr)
exit(1)
extract_cmd = [ '/bin/star', '-x', '-no-fifo',
'-nowarn', '-no-statistics' ]
self.extract = subprocess.Popen(extract_cmd,
cwd=os.path.join(mount, path),
stdin=self.primary_out)
atexit.register(cond_kill, self.extract)
# Make sure that the generated star archive is not empty
self.primary_in.write(b'.\0')
......@@ -159,7 +157,6 @@ def do_backup(hash_name, options, socket_path, mount, path):
status = Status(log)
config_path = '%s/TOTALBACKUP.config' % (mount)
if not os.path.exists(config_path):
raise Exception('"%s" does not exists' % (config_path))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment