force_exit() to make exit work with all fdroid build conditions

The build command has to use some threading stuff to handle the timeout and
locks.  This seems to prevent the command from exiting, unless this hack is
used.
This commit is contained in:
Hans-Christoph Steiner 2018-11-14 14:27:32 +01:00
parent 568256f75c
commit 1f346b3149
3 changed files with 19 additions and 10 deletions

4
fdroid
View file

@ -149,9 +149,7 @@ def main():
sys.exit(1)
except KeyboardInterrupt:
print('')
sys.stdout.flush()
sys.stderr.flush()
os._exit(1)
fdroidserver.common.force_exit(1)
# These should only be unexpected crashes due to bugs in the code
# str(e) often doesn't contain a reason, so just show the backtrace
except Exception as e: