not digg
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
bleistift2@sopuli.xyz to Programmer Humor@programming.devEnglish · 6 months ago

Thinking I could clean up my files in a SIGINT handler

sopuli.xyz

message-square
4
fedilink
379

Thinking I could clean up my files in a SIGINT handler

sopuli.xyz

bleistift2@sopuli.xyz to Programmer Humor@programming.devEnglish · 6 months ago
message-square
4
fedilink
alert-triangle
You must log in or register to comment.
  • deadcream@sopuli.xyz
    link
    fedilink
    arrow-up
    0
    ·
    6 months ago

    That’s why you launch them through systemd.

    • bleistift2@sopuli.xyzOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      6 months ago

      The constant nagging by you systemd people worked. I’ve written a unit that does what I need it to do. That was more annoying than I think it needed to be, but well… my solution didn’t work at all.

      • deadcream@sopuli.xyz
        link
        fedilink
        arrow-up
        1
        ·
        6 months ago

        AFAIK kernel itself doesn’t send any signals to processes on shutdown/reboot, it just stops executing them. This is a job service manager (e.g. systemd) that terminates processes using SIGTERM before asking kernel to shutdown.

  • sunshine@lemmy.ml
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    6 months ago

    Interesting. Is this top answer accurate then?

    https://stackoverflow.com/questions/31731980/handling-a-linux-system-shutdown-operation-gracefully

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 434 users / day
  • 3.67K users / week
  • 9.08K users / month
  • 19.1K users / 6 months
  • 1 local subscriber
  • 24.6K subscribers
  • 1.54K Posts
  • 13.3K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org