mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-02 09:10:11 +02:00
build: hard exit on success to avoid hanging
Something is preventing `fdroid build --all` from exiting after a long run. @bubu, @uniqx and I think it is because of the use of AsynchronousFileReader, somehow it's thread does not exit. So the workaround for now is to just try a hard exit instead of waiting for things to finish cleanly with `sys.exit(0)`. https://jenkins.debian.net/job/reproducible_fdroid_build_apps/94/console
This commit is contained in:
parent
68bbfa7e0e
commit
b8ed892ad9
@ -1345,7 +1345,10 @@ def main():
|
||||
logging.info(ngettext("{} build failed",
|
||||
"{} builds failed", len(failed_apps)).format(len(failed_apps)))
|
||||
|
||||
sys.exit(0)
|
||||
# hack to ensure this exits, even is some threads are still running
|
||||
sys.stdout.flush()
|
||||
sys.stderr.flush()
|
||||
os._exit(0)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -1970,6 +1970,7 @@ def FDroidPopenBytes(commands, cwd=None, envs=None, output=True, stderr_to_stdou
|
||||
raise BuildException("OSError while trying to execute " +
|
||||
' '.join(commands) + ': ' + str(e))
|
||||
|
||||
# TODO are these AsynchronousFileReader threads always exiting?
|
||||
if not stderr_to_stdout and options.verbose:
|
||||
stderr_queue = Queue()
|
||||
stderr_reader = AsynchronousFileReader(p.stderr, stderr_queue)
|
||||
|
Loading…
Reference in New Issue
Block a user