Work in progress: 181,232 of 181,233 sites checked so far, more every week · updated 2 Nov 2026Missing a blog? Tell us

Top all-time · #5683

J

Joe Shaw

Personal blog · joeshaw.orgprogrammingsystems

Joe Shaw writes joe shaw, a personal blog at joeshaw.org about programming and systems. Since 2009, 13 different Hacker News readers have linked it 13 times, most often “Don’t defer Close() on writable files (Go)”. The last post was in 2021, but the archive is still widely read.

Visit the blog
13mentions?
13HN people?
2009–2024first – last linked?
Links on Hacker News per year · peak 4 in 2017

Too few sampled comments (2) to say how often HN recommends it.?

Why HN links it

HN readers link Joe Shaw's post 'Don't defer close on writable files', which covers the errors that close(2) can return. It is cited in a Rust compiler discussion.

Summarised by Claude from a sample of 2 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.

joe shaw

Most-linked posts?

  1. Don’t defer Close() on writable files (Go)
    2 people · 2 mentions · first linked 2017-06-12
  2. Understanding Go panic output
    2 people · 2 mentions · first linked 2017-11-10
  3. Go's net/context and http.Handler
    2 people · 2 mentions · first linked 2015-05-07
  4. Don't defer Close() on writable files (2017)
    2 people · 2 mentions · first linked 2019-06-04

What Hacker News says?

  1. hu3 · 2022-05-05Recommends
    Great question! Here is a better explanation than I could write: https://www.joeshaw.org/dont-defer-close-on-writable-files In resume, man close(2), gives us the potential errors. This is the output for Ubuntu 20.04 LTS: EBADF fd isn't a valid open file descriptor. EINTR The close() call was interrupted by a signal; see signal(7). EIO An I/O error occurred. ENOSPC, EDQUOT On NFS, these errors are not normally report…

    Comment linking /dont-defer-close-on-writable-files

    on “Bugs that the Rust compiler catches for you”
  2. Submitted Don't defer Close() on writable files (2017) as a story · 253 points

    HN discussion
  3. Python is "less of a problem" but you still may hit that wall. You can do "stupid stuff" in any language and have that same outcome, php just gives more rope than the rest! Recently, on a short term contract, I had to deal with a lot of PHP code that was running in a similar manner. I ended up using golang, to monitor the queue and spin up Goroutines that executed the PHP code ONCE. Between the concurrency, and php…

    Comment linking /net-context-and-http-handler/

    on “Ask HN: Python or Go?”
  4. Submitted Understanding Go panic output as a story · 99 points

    HN discussion
  5. Submitted Don’t defer Close() on writable files (Go) as a story · 3 points

    HN discussion
  6. Submitted Go's net/context and http.Handler as a story · 3 points

    HN discussion
  7. Submitted Abusing go:linkname to customize TLS 1.3 cipher suites as a story · 2 points

    HN discussion
  8. Submitted Understanding Go panic output as a story · 2 points

    HN discussion
  9. Submitted Contributing to GitHub projects as a story · 2 points

    HN discussion
  10. Submitted Don't defer Close() on writable files – Golang as a story · 1 points

    HN discussion
  11. Submitted Don’t defer Close() on writable files as a story · 1 points

    HN discussion
  12. Submitted Python daemon threads considered harmful (2009) as a story · 1 points

    HN discussion
  13. Submitted Giticular cancer as a story · 1 points

    HN discussion

Search all of HN for joeshaw.org

Linked by the same people?