GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Dan Gohman (sunfish@hachyderm.io)'s status on Tuesday, 10-Sep-2024 16:15:42 JST Dan Gohman Dan Gohman

    New blog post: Errors from `close`.

    Following up on my enormously(?) popular blog post about bugs in hello world, I dive into the electrifying topic of whether the fixed version still has a bug lurking. 🐛

    https://blog.sunfishcode.online/errors-from-close/

    In conversation Tuesday, 10-Sep-2024 16:15:42 JST from hachyderm.io permalink

    Attachments

    1. No result found on File_thumbnail lookup.
      Errors from `close`
      from Dan Gohman
      A blog by sunfishcode
    • Embed this notice
      Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Tuesday, 10-Sep-2024 20:33:30 JST Haelwenn /элвэн/ :triskell: Haelwenn /элвэн/ :triskell:
      in reply to

      @sunfish Wouldn't the problem of dup-then-close being ignored due to reference counting also apply on the file descriptors passed by the shell? (Which effectively does open/fd-pass/close for redirections)

      Also for me calling close on files explicitly opened makes sense, while calling close on passed fds feels weird although exit(), implied for returns from main, closes all open streams. (cf. ISO C)

      In conversation Tuesday, 10-Sep-2024 20:33:30 JST permalink
    • Embed this notice
      Dan Gohman (sunfish@hachyderm.io)'s status on Wednesday, 11-Sep-2024 05:29:44 JST Dan Gohman Dan Gohman
      in reply to
      • Haelwenn /элвэн/ :triskell:

      @lanodan

      > Wouldn't the problem [...] also apply on the file descriptors passed by the shell?

      The shell closes its own fd after doing the `dup2`, so the reference count would go back to 1 before the fd is passed to the new application.

      In conversation Wednesday, 11-Sep-2024 05:29:44 JST permalink
      Haelwenn /элвэн/ :triskell: likes this.

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.