Conversation
Edited 1 month ago

have to get used to having 1 less terminal window open all the time ever since shutting down the snake bot

edit: i have notifications muted on this thread, i might not see your replies

2
0
0

i keep pressing super+5 to get to firefox, but now it is super+4

0
0
0

๐Ÿณ๏ธโ€๐ŸŒˆ๐ŸŽƒ๐Ÿ‡ง๐Ÿ‡ทLuana๐Ÿ‡ง๐Ÿ‡ท๐ŸŽƒ๐Ÿณ๏ธโ€๐ŸŒˆ

@kemona_halftau you kept it in an open terminal window? blobcatgooglyholdingitsheadinitshands

1
0
1

@luana uhhm how else would i have run it

1
0
0

@solonovamax @luana idk i just like having a bunch of terminal windows always open on my second monitor, its pleasant to look at imo (and also i can very quickly and immediately restart things if/when i need to)

1
0
0
@solonovamax @luana @kemona_halftau the simpler way i would say is you can always ./program &; disown $pid which forks it and disowns it
1
0
1
@kemona_halftau @luana tmux/screen/dtach or init system (user) service or just running in the background with & (or ^Z and bg) and disowning the process
0
0
2

@kemona_halftau @luana I already have so many terminals it starts to get messy

also, restarting is super easy

# systemctl restart program
1
0
1

๐Ÿณ๏ธโ€๐ŸŒˆ๐ŸŽƒ๐Ÿ‡ง๐Ÿ‡ทLuana๐Ÿ‡ง๐Ÿ‡ท๐ŸŽƒ๐Ÿณ๏ธโ€๐ŸŒˆ

@kemona_halftau @solonovamax it has autorestart on crashes and stuff

0
0
0

๐Ÿณ๏ธโ€๐ŸŒˆ๐ŸŽƒ๐Ÿ‡ง๐Ÿ‡ทLuana๐Ÿ‡ง๐Ÿ‡ท๐ŸŽƒ๐Ÿณ๏ธโ€๐ŸŒˆ

@kemona_halftau As a systemd service!!

With autostart, autorestart and stuff

(Or openrcs equivalent, if that's what your distro uses)

0
0
0
@kemona_halftau ok the more i read this the more i'm confused, because my operating systems class taught me that a parent process forking a child process still owns the child, and if the parent is killed so is the child, but you have to call some system call to disown the process and make it Not do that... but idk my memories are kind of a garble
1
0
1

@solonovamax @kemona_halftau @luana thereโ€™s too many commands beginning with sy (even installed by systemd, thereโ€™s a load of systemd-*) and systemctl subcommands beginning with re for that to work. on my server the shortest unique tab completion is sudo systemc[tab] rest[tab]

1
0
1

@pastthepixels @kemona_halftau testing using this program:

#include <stdio.h>
#include <unistd.h>

int main(void) {
        pid_t pid = fork();
        switch (pid) {
        case -1:
                perror("fork");
                return 1;
        case 0: // child
                printf("child\n");
                for (;;) pause();
        default: // parent
                printf("parent, child PID = %d\n", pid);
                return 0;
        }
}

the child process does not get killed when the parent terminates. on linux, you can set the signal child processes receive when the parent dies using prctl(PR_SET_PDEATHSIG, โ€ฆ), but by default the child processes do not get killed when the parent dies

0
0
1

@noisytoot @kemona_halftau @luana oh right

I was typing that on my phone

still, typing it out doesn't that that long

1
0
0

๐Ÿณ๏ธโ€๐ŸŒˆ๐ŸŽƒ๐Ÿ‡ง๐Ÿ‡ทLuana๐Ÿ‡ง๐Ÿ‡ท๐ŸŽƒ๐Ÿณ๏ธโ€๐ŸŒˆ

@solonovamax @noisytoot @kemona_halftau if you have a particularly problematic serviรงo it'll always be the first autocomplete from sys anyway

1
0
0

@luana @noisytoot @kemona_halftau the humble systemd timer to restart a systemd unit every n hours:

0
0
0