(kemona_halftau)
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
(kemona_halftau)
i keep pressing super+5 to get to firefox, but now it is super+4
@kemona_halftau you kept it in an open terminal window? 
(kemona_halftau)
@luana uhhm how else would i have run it
(kemona_halftau)
@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)
./program &; disown $pid which forks it and disowns it
(kemona_halftau)
@pastthepixels @solonovamax @luana is that similar to nohup?
@kemona_halftau @luana I already have so many terminals it starts to get messy
also, restarting is super easy
# systemctl restart program
(kemona_halftau)
@solonovamax @luana vs ^c, up arrow, enter?
@kemona_halftau @solonovamax it has autorestart on crashes and stuff
@kemona_halftau As a systemd service!!
With autostart, autorestart and stuff
(Or openrcs equivalent, if that's what your distro uses)
@kemona_halftau @pastthepixels @luana this summarizes the differences: https://unix.stackexchange.com/questions/3886/difference-between-nohup-disown-and
@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]
@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
@noisytoot @kemona_halftau @luana oh right
I was typing that on my phone
still, typing it out doesn't that that long
@solonovamax @noisytoot @kemona_halftau if you have a particularly problematic serviรงo it'll always be the first autocomplete from sys anyway
@luana @noisytoot @kemona_halftau the humble systemd timer to restart a systemd unit every n hours: