]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Clean up Unix Pageant's setup and teardown.
authorSimon Tatham <anakin@pobox.com>
Thu, 7 May 2015 18:04:25 +0000 (19:04 +0100)
committerSimon Tatham <anakin@pobox.com>
Thu, 7 May 2015 18:06:12 +0000 (19:06 +0100)
commit47c9a6ef0bda6bed52f1c37ff4f8ef98734d349a
tree9d72d571fcda0250a764b578a9bbd1e8d2e28f01
parent4a875b5f8b806a91c8a309d699d37d251d78b8f7
Clean up Unix Pageant's setup and teardown.

I've moved the listening socket setup back to before the lifetime
preparations, so in particular we find out that we couldn't bind to
the socket _before_ we fork. The only part that really needed to come
after lifetime setup was the logging setup, so that's now a separate
function called later.

Also, the random exit(0)s in silly places like x11_closing have turned
into setting a time_to_die flag, so that all clean exits funnel back
to the end of main() which at least tries to tidy up a bit afterwards.

(Finally, fixed a small bug in testing the return value of waitpid(),
which only showed up once we didn't exit(0) after the first wait.
Ahem.)
pageant.c
pageant.h
unix/uxpgnt.c