Dear list, I noticed that wget does not explicitly close the session when exiting. Looking dtruss output on Mac OS X,
73072/0x11a24f: read(0x6, "hts reserved.</div>\n\t\t<div class=\"ac-gf-footer-legal-links\"> <a class=\"ac-gf-footer-legal-link\" href=\"/privacy/privacy-policy/\">Privacy Policy</a> <a class=\"ac-gf-footer-legal-link\" href=\"/legal/internet-services/terms/site.html\">Terms of Use</a> <a class=", 0x307) = 775 0 73072/0x11a24f: write_nocancel(0x7, "hts reserved.</div>\n\t\t<div class=\"ac-gf-footer-legal-links\"> <a class=\"ac-gf-footer-legal-link\" href=\"/privacy/privacy-policy/\">Privacy Policy</a> <a class=\"ac-gf-footer-legal-link\" href=\"/legal/internet-services/terms/site.html\">Terms of Use</a> <a class=", 0x307) = 775 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, " \0", 0x1) = 1 0 73072/0x11a24f: write_nocancel(0x2, "100%\0", 0x4) = 4 0 73072/0x11a24f: write_nocancel(0x2, " 1.34M\0", 0x6) = 6 0 73072/0x11a24f: write_nocancel(0x2, "=0.02s\0", 0x6) = 6 0 73072/0x11a24f: write_nocancel(0x2, "\n\n\0", 0x2) = 2 0 73072/0x11a24f: close_nocancel(0x7) = 0 0 73072/0x11a24f: write_nocancel(0x2, "2015-12-10 15:50:34 (1.34 MB/s) - 'index.html.1' saved [29486/29486]\n\n\0", 0x46) = 70 0 73072/0x11a24f: close(0x3) = 0 0, 0x6 is not closed. I double check this by inserting debug output to fd_close function. It also show that fd_close is not called for 0x6. This would not matter much, because exit() closes all fd anyways. Probably this is intentional. But, it could be regarded a bad style (ok, it depends on your taste). My crude monitor says that file descriptors 4 and 5 also are not explicitly closed when exiting. I’m not sure its accuracy. I am curious about your opinion. Best, — Yoriyuki Yamagata National Institute of Advanced Science and Technology (AIST), Senior Researcher http://staff.aist.go.jp/yoriyuki.yamagata/en/
