Hard Pass
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@infosec.pub to Programmer Humor@programming.dev · 8 个月前

Closing programs

infosec.pub

message-square
149
link
fedilink
685

Closing programs

infosec.pub

cm0002@infosec.pub to Programmer Humor@programming.dev · 8 个月前
message-square
149
link
fedilink
  • vogi@piefed.social
    link
    fedilink
    English
    arrow-up
    55
    ·
    8 个月前

    Isn’t that what SIGTERM is? A request to gracefully shutdown processes.

    • 9point6@lemmy.world
      link
      fedilink
      arrow-up
      25
      ·
      8 个月前

      kill, and I swear to god if you’re still there when I ps, I’m getting out the -9

      • 6️⃣9️⃣4️⃣2️⃣0️⃣@lemmy.world
        link
        fedilink
        English
        arrow-up
        17
        ·
        8 个月前
        alias murder="kill -9"
        
      • marcos@lemmy.world
        link
        fedilink
        arrow-up
        9
        ·
        8 个月前

        Yeah, by default kill sends sigterm, and not kill the process at all.

        It’s the correct behavior, sending sigkill by default would be harmful. Now take a look at how killall worked in Solaris (before it adopted GNU).

      • toynbee@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        8 个月前

        https://youtube.com/watch?v=Fow7iUaKrq4

        • 9point6@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          8 个月前

          Okay that took me by surprise

          I’ll be sharing this

          • toynbee@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            8 个月前

            Please do!

    • pewpew@feddit.it
      link
      fedilink
      arrow-up
      13
      ·
      8 个月前

      Systemd waits until the services terminate before shutting down

    • andyburke@fedia.io
      link
      fedilink
      arrow-up
      10
      ·
      8 个月前

      killall -9

    • cannedtuna@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      8 个月前

      How’s that differ from SIGHUP?

      • pivot_root@lemmy.world
        link
        fedilink
        arrow-up
        10
        ·
        8 个月前

        Historical context, delivery, and handling.

        HUP—hang up—is sent to indicate the TTY is closed.
        TERM—terminate— is sent by request.

        What happens when received is usually up to the process. Most of them just leave the defaults, which is to exit.

      • Ethan@programming.dev
        link
        fedilink
        English
        arrow-up
        3
        ·
        8 个月前

        They’re different signals. The default handling is the same - terminate - but they’re triggered by different things and (if the process handles them) handled by separate handlers.

    • pet the cat, walk the dog@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      8 个月前

      I bet the GUI environments also have their own mechanisms to indicate that the app needs to close, before whipping out the signals.

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.

  • 2.03K users / day
  • 2.36K users / week
  • 6.87K users / month
  • 16.5K users / 6 months
  • 1 local subscriber
  • 33.2K subscribers
  • 1.66K Posts
  • 41.2K Comments
  • Modlog
  • mods:
  • adr1an@programming.dev
  • Feyter@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.20
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org