• MammutX@europe.pub
    link
    fedilink
    arrow-up
    7
    ·
    2 hours ago

    and this how I deleted the file I edited the entire day: shutdown -h now. No go to bed NOW!

  • Realitätsverlust@lemmy.zip
    link
    fedilink
    English
    arrow-up
    38
    arrow-down
    2
    ·
    4 hours ago

    Linux does give every application time to shut down correctly, but unlike windows, it won’t wait for ages until every process is down. Linux WILL shut down in a certain timeframe, whereas windows waits for years if necessary. In my old job, we all had to use windows and I had times where I clicked shut down, turned off my monitor, grabbed my stuff, left and in the next morning, the PC was still on because Notepad refused to just close lmao.

    • WIZARD POPE💫@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      2 hours ago

      That is what infuriates me so much. Instead of just killing the process after 5 mins of waiting it just cancels the shutdown. Like fuck off with that shit.

      • InFerNo@lemmy.ml
        link
        fedilink
        arrow-up
        8
        arrow-down
        1
        ·
        2 hours ago

        Depending on the use case, that can be a good thing or a bad thing

  • h4x0r@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    15
    ·
    4 hours ago
    $ kill -L
     1) SIGHUP	 2) SIGINT	 3) SIGQUIT	 4) SIGILL	 5) SIGTRAP
     6) SIGABRT	 7) SIGBUS	 8) SIGFPE	 9) SIGKILL	10) SIGUSR1
    11) SIGSEGV	12) SIGUSR2	13) SIGPIPE	14) SIGALRM	15) SIGTERM
    16) SIGSTKFLT	17) SIGCHLD	18) SIGCONT	19) SIGSTOP	20) SIGTSTP
    21) SIGTTIN	22) SIGTTOU	23) SIGURG	24) SIGXCPU	25) SIGXFSZ
    26) SIGVTALRM	27) SIGPROF	28) SIGWINCH	29) SIGIO	30) SIGPWR
    31) SIGSYS	34) SIGRTMIN	35) SIGRTMIN+1	36) SIGRTMIN+2	37) SIGRTMIN+3
    38) SIGRTMIN+4	39) SIGRTMIN+5	40) SIGRTMIN+6	41) SIGRTMIN+7	42) SIGRTMIN+8
    43) SIGRTMIN+9	44) SIGRTMIN+10	45) SIGRTMIN+11	46) SIGRTMIN+12	47) SIGRTMIN+13
    48) SIGRTMIN+14	49) SIGRTMIN+15	50) SIGRTMAX-14	51) SIGRTMAX-13	52) SIGRTMAX-12
    53) SIGRTMAX-11	54) SIGRTMAX-10	55) SIGRTMAX-9	56) SIGRTMAX-8	57) SIGRTMAX-7
    58) SIGRTMAX-6	59) SIGRTMAX-5	60) SIGRTMAX-4	61) SIGRTMAX-3	62) SIGRTMAX-2
    63) SIGRTMAX-1	64) SIGRTMAX
    
  • astrsk@fedia.io
    link
    fedilink
    arrow-up
    43
    ·
    5 hours ago

    If your app doesn’t respond to SIGTERM gracefully, you need to fix your app. The system did its job as documented.

    • Jakeroxs@sh.itjust.works
      link
      fedilink
      arrow-up
      6
      ·
      5 hours ago

      I’ve tried to turn a pc off to go to sleep, only to realize in the morning it’s still on because some program refused to close.

      Now when I see the prompt to force close, I just say yes.

  • chronicledmonocle@lemmy.world
    link
    fedilink
    arrow-up
    91
    ·
    9 hours ago

    Linux gives processed a chance to gracefully close. However, it also will absolutely NOT allow a process to hang up the shutdown or restart procedure after a point. If you’re using systemd (which there is a good chance you are), it’ll count down. If the process hasn’t stopped in the time allotted, it gets Old Yellered.

  • Raltoid@lemmy.world
    link
    fedilink
    arrow-up
    268
    arrow-down
    5
    ·
    edit-2
    13 hours ago
    1. Linux normally does a nice shutdown as well, unless you force it.

    2. You can force it on windows if you really want.

    I’m so tired of linux memes posted/made by people who don’t know much about windows or linux.

    • derpgon@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      2 hours ago
      1. Linux programs either HAVE to be quick while receiving shutdown signal, otherwise the state will be fucked, work will be lost, and people will be mad, and program will stop being used.

      2. Clicking the Windows button to force shutdown will straight up kill the program and won’t care at all.

    • Shanmugha@lemmy.world
      link
      fedilink
      arrow-up
      11
      arrow-down
      3
      ·
      edit-2
      5 hours ago

      Oh, p-lease, can force it my ass, Linux has never failed to shutdown on me when using plain obvious GUI method. windows - can easily hang on forever as long as computer stays powered. The point of all the memes is exactly insane windows defaults, not the things that can or can’t be done by someone with enough knowledge

    • cmgvd3lw@discuss.tchncs.de
      link
      fedilink
      arrow-up
      31
      arrow-down
      1
      ·
      edit-2
      10 hours ago

      Absolutely, if people agree or not, the core windows is still a pretty powerful operating system. Its sad that they are ruining it by adding crap into it.

      • madame_gaymes@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        1
        ·
        edit-2
        3 hours ago

        There’s also a hardware way, works on practically any device. Phone, tablet, laptop, desktop, etc. Doesn’t matter what the OS is.

        Press and hold power button for anywhere between 5 - 15 seconds. The second half of this meme describes this method the best, methinks.

        • criticon@lemmy.ca
          link
          fedilink
          arrow-up
          10
          ·
          8 hours ago

          Some clarification of the command

          -r #restart

          -s #shutdown

          -t 00 #wait 0 seconds

          -f #forced

            • Laurel Raven@lemmy.zip
              link
              fedilink
              English
              arrow-up
              5
              ·
              5 hours ago

              I can’t speak for them if they’re joking or not but it’s something you can absolutely do. *.bat files (short for “batch”, as in a batch of commands to execute in sequence) are the script files for the Windows command line, and can be executed by double clicking on them

              • jmacapp@lemm.ee
                link
                fedilink
                arrow-up
                1
                ·
                5 hours ago

                Thanks, I’m familiar with batch files. This just seems like a very bad way to perform a shutdown, especially when running a UI Desktop windowing system. And even if that shutdown command is fully supported from the GUI, I would guess you need to be admin to run it, which means you can run the bat file as admin, so if you can edit the file or modify the env in which it runs (e.g. PATH) it seems like it could be a security problem. And if you don’t need to be root to run the shutdown command, that seems like its own problem. I suppose Windows still has the “run as administrator” from the context menu so maybe that helps.

                • Sonicdemon86@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  3 hours ago

                  As it is a simple command you don’t need to be an admin or run as administrator. Listen kids don’t run batch files if you don’t know where they came from or who made them.

        • kewko@sh.itjust.works
          link
          fedilink
          arrow-up
          6
          arrow-down
          7
          ·
          11 hours ago

          If -t is specified -f is assumed and redundant, but also it will try to do graceful l, but with a patience of a cranky toddler

          • aeiou_ckr@lemmy.world
            link
            fedilink
            arrow-up
            17
            ·
            11 hours ago

            Not really. If -f (force) is removed windows will shutdown similar to pressing the shutdown button and will wait for your input regarding open programs. -f is needed to just just “do it” with no hesitation or response from the user.

            • kewko@sh.itjust.works
              link
              fedilink
              arrow-up
              4
              arrow-down
              5
              ·
              edit-2
              10 hours ago

              Straight from the doc

              /t <xxx> Sets the time-out period before shutdown to xxx seconds. The valid range is 0-315360000 (10 years), with a default of 30. If the timeout period is greater than 0, the /f parameter is implied.

              • Lupus@feddit.org
                link
                fedilink
                arrow-up
                24
                ·
                10 hours ago

                Sooo when you use the prompt

                Shutdown.exe -r -t 00

                You would need the -f since we defined the timeout period as 0. Because:

                If the timeout period is greater than 0, the /f parameter is implied.

      • Dave@lemmy.nz
        link
        fedilink
        arrow-up
        16
        arrow-down
        1
        ·
        13 hours ago

        The process manager lets you kill any process.

        You can also click the do it anyway button when it’s waiting on shutdown, but I’ve had less consistent success with that.

    • Apytele@sh.itjust.works
      link
      fedilink
      arrow-up
      8
      ·
      12 hours ago

      It was simpler using Linux to just kill things unceremoniously, but my coworkers are also consistently amazed when Epic throws a temper tantrum (rare, but it happens) and I walk over and ctrl-alt-delete and tell it to sit down and shut the fuck up until it’s ready to reboot and act right.