UAXNYGTY5WW362DZGATUDLJZ5SI3CNIFQSD7UBUWT2AWLKW74BUAC
PQYGOOYRIUMI2SD3P4DIEWHTH3STBX5GYKUVOUOL3475CHJX7GPAC
2YLXCFG3TCPODWEGJMVIMZM2UGMGCOTSFUE6TR62ZHRCFH6QAK4AC
7H6W67ZT22SJ2DP47V3TTH5VYSIRP2FKXQL4GKU5MUHQ3CKEFSQQC
KETOERAX3TX43N36QK3QCFGOA7LIXYX4FAALTIIYXZHA5I2KJTWQC
DVIKUDWGLYAXDT767MGFX65BAR33Y33LA3OURKHCZSEUZCWY77GAC
3KWRX6PG7WYHGRAZMYHIKHOP2T3VQBDT4H46LUQF4PB63INUWLXQC
EWOLNWEEVBOKTQXX5VXZPCX7TXXBAFJNV6PVVN7FNTLCGE5EEAIQC
GG223LD6DPJ4NKDZGOIVDPZRGZPVCLIRVVJXVAFBLUXY22MBAWBAC
IQE3R65E5ZDBOZNJCQSDAQG6TTHA3QHMOSVYNTZCX5X7W6ETWX6AC
7OC5LAYWG3UMJ6ENKXQLED5BIS4NI6V4SNZPDSB2GG5I657BRVJAC
2OG32JBPKEV7WTTLR2J5CX4IERUCCFJGYZMVHQ3CLXXGHQWGNSLAC
XC52NQJMCHQ4KKHZU4VRQAS7FUFKB5AKASOZ6DRHZUBHK5VMGSIQC
6ZFYETSB2X4X6J4DMADPH3CVRBWCZQMBQ27AOWWHUBBANNB7P63AC
ZEYQU7OSRCS5C3GXTFWYXO6ZJ5XAV5S5EM7MOOOOKZ64XEA4YNLAC
5F7FQOTRMHTFZM2DLCYR2KFCT2ZX55Y5SWPAAUZ4SVFBTTB77ARQC
UKBUKLXIOXLGV6EKNX7N47A7YCE4JA7CVXYDUSHKHXKEKBN2MAFQC
# psmisc 23.x killall doesn't match long process names
let's use more fool-proof methods
This is an [old][old], [fixed issue][fix] ([with more fixes to come][fixes]), but I would like to highlight it for anyone having trouble with killall. It affects Debian10 buster (stable release [from 2019 until 2021][buster-stable]), plus derivative Ubuntu versions. Reproduction based on Debian [bug #912748][bug]:
```dash
❯ podman run -it registry.hub.docker.com/amd64/debian:buster-slim bash -c 'apt update -qq && apt install -qqy psmisc procps; bash -i'
ln -sf /bin/sleep 0123456789abcd && ./0123456789abcd 1h &
ln -sf /bin/sleep 0123456789abcde && ./0123456789abcde 1h &
ln -sf /bin/sleep 0123456789abcdef && ./0123456789abcdef 1h &
```
With debian9, psmisc 22.21:
```dash
psmisc-22.21# pgrep -fla abcd
261 ./0123456789abcd 1h
264 ./0123456789abcde 1h
267 ./0123456789abcdef 1h
psmisc-22.21# killall -v -0 0123456789abcd
Killed 0123456789abcd(261) with signal 0
psmisc-22.21# killall -v -0 0123456789abcde
Killed 0123456789abcde(264) with signal 0
psmisc-22.21# killall -v -0 0123456789abcdef
Killed 0123456789abcdef(267) with signal 0
```
With debian10, psmisc 23.2:
```dash
psmisc-23.2# pgrep -fla abcd
322 ./0123456789abcd 1h
325 ./0123456789abcde 1h
328 ./0123456789abcdef 1h
psmisc-23.2# killall -v -0 0123456789abcd
Killed 0123456789abcd(322) with signal 0
psmisc-23.2# killall -v -0 0123456789abcde
Killed 0123456789abcde(325) with signal 0
Killed 0123456789abcde(328) with signal 0
psmisc-23.2# killall -v -0 0123456789abcdef
0123456789abcdef: no process found
```
With debian11, psmisc 23.4:
```dash
psmisc-23.4# killall -v -0 0123456789abcd
Killed 0123456789abcd(329) with signal 0
psmisc-23.4# killall -v -0 0123456789abcde
Killed 0123456789abcde(332) with signal 0
Killed 0123456789abcde(335) with signal 0
psmisc-23.4# killall -v -0 0123456789abcdef
Killed 0123456789abcde(332) with signal 0
Killed 0123456789abcde(335) with signal 0
```
You can imagine our surprise when a logrotate postrotate action didn’t poke any process, and the services keep sending log to a deleted file descriptor. Fortunately, we don’t use killall for other purposes, so the 15-character-prefix multikill didn’t bite us.
Our developers noticed missing log before we rolled this to production. They also took the initiative to convert convoluted init.d scripts to declarative systemd units. This avoids both name-based guessing like killall/pkill, and old-style PID-file based process management.
In the future, killall is looking into safer, non-pid-racing methods such as openat+pidfd. Let’s keep an eye out for such improvements, for situations where we can’t apply cgroups or other namespacing methods.
[old]: https://gitlab.com/psmisc/psmisc/-/commit/1188315cd037d73bf946a0003b70c6423cc330d2
[fix]: https://gitlab.com/psmisc/psmisc/-/commit/1188315cd037d73bf946a0003b70c6423cc330d2
[fixes]: https://gitlab.com/psmisc/psmisc/-/merge_requests/28
[buster-stable]: https://wiki.debian.org/DebianBuster
[pidfd]: https://gitlab.com/psmisc/psmisc/-/issues/37
[bug]: https://bugs.debian.org/912748
# Blue Oak Model License
Version 1.0.0
## Purpose
This license gives everyone as much permission to work with
this software as possible, while protecting contributors
from liability.
## Acceptance
In order to receive this license, you must agree to its
rules. The rules of this license are both obligations
under that agreement and conditions to your license.
You must not do anything with this software that triggers
a rule that you cannot or will not follow.
## Copyright
Each contributor licenses you to do everything with this
software that would otherwise infringe that contributor's
copyright in it.
## Notices
You must ensure that everyone who gets a copy of
any part of this software from you, with or without
changes, also gets the text of this license or a link to
<https://blueoakcouncil.org/license/1.0.0>.
## Excuse
If anyone notifies you in writing that you have not
complied with [Notices](#notices), you can keep your
license by taking all practical steps to comply within 30
days after the notice. If you do not do so, your license
ends immediately.
## Patent
Each contributor licenses you to do everything with this
software that would otherwise infringe any patent claims
they can license or become able to license.
## Reliability
No contributor can revoke this license.
## No Liability
***As far as the law allows, this software comes as is,
without any warranty or condition, and no contributor
will be liable to anyone for any damages related to this
software or this license, under any kind of legal claim.***
# psmisc 23.x killall doesn't match long process names
let's use more fool-proof methods
This is an [old][old], [fixed issue][fix] ([with more fixes to come][fixes]), but I would like to highlight it for anyone having trouble with killall. It affects Debian10 buster (stable release [from 2019 until 2021][buster-stable]), plus derivative Ubuntu versions. Reproduction based on Debian [bug #912748][bug]:
```dash
❯ podman run -it registry.hub.docker.com/amd64/debian:buster-slim bash -c 'apt update -qq && apt install -qqy psmisc procps; bash -i'
ln -sf /bin/sleep 0123456789abcd && ./0123456789abcd 1h &
ln -sf /bin/sleep 0123456789abcde && ./0123456789abcde 1h &
ln -sf /bin/sleep 0123456789abcdef && ./0123456789abcdef 1h &
```
With debian9, psmisc 22.21:
```dash
psmisc-22.21# pgrep -fla abcd
261 ./0123456789abcd 1h
264 ./0123456789abcde 1h
267 ./0123456789abcdef 1h
psmisc-22.21# killall -v -0 0123456789abcd
Killed 0123456789abcd(261) with signal 0
psmisc-22.21# killall -v -0 0123456789abcde
Killed 0123456789abcde(264) with signal 0
psmisc-22.21# killall -v -0 0123456789abcdef
Killed 0123456789abcdef(267) with signal 0
```
With debian10, psmisc 23.2:
```dash
psmisc-23.2# pgrep -fla abcd
322 ./0123456789abcd 1h
325 ./0123456789abcde 1h
328 ./0123456789abcdef 1h
psmisc-23.2# killall -v -0 0123456789abcd
Killed 0123456789abcd(322) with signal 0
psmisc-23.2# killall -v -0 0123456789abcde
Killed 0123456789abcde(325) with signal 0
Killed 0123456789abcde(328) with signal 0
psmisc-23.2# killall -v -0 0123456789abcdef
0123456789abcdef: no process found
```
With debian11, psmisc 23.4:
```dash
psmisc-23.4# killall -v -0 0123456789abcd
Killed 0123456789abcd(329) with signal 0
psmisc-23.4# killall -v -0 0123456789abcde
Killed 0123456789abcde(332) with signal 0
Killed 0123456789abcde(335) with signal 0
psmisc-23.4# killall -v -0 0123456789abcdef
Killed 0123456789abcde(332) with signal 0
Killed 0123456789abcde(335) with signal 0
```
You can imagine our surprise when a logrotate postrotate action didn’t poke any process, and the services keep sending log to a deleted file descriptor. Fortunately, we don’t use killall for other purposes, so the 15-character-prefix multikill didn’t bite us.
Our developers noticed missing log before we rolled this to production. They also took the initiative to convert convoluted init.d scripts to declarative systemd units. This avoids both name-based guessing like killall/pkill, and old-style PID-file based process management.
In the future, killall is looking into safer, non-pid-racing methods such as openat+pidfd. Let’s keep an eye out for such improvements, for situations where we can’t apply cgroups or other namespacing methods.
[old]: https://gitlab.com/psmisc/psmisc/-/commit/1188315cd037d73bf946a0003b70c6423cc330d2
[fix]: https://gitlab.com/psmisc/psmisc/-/commit/1188315cd037d73bf946a0003b70c6423cc330d2
[fixes]: https://gitlab.com/psmisc/psmisc/-/merge_requests/28
[buster-stable]: https://wiki.debian.org/DebianBuster
[pidfd]: https://gitlab.com/psmisc/psmisc/-/issues/37
[bug]: https://bugs.debian.org/912748
#!/bin/bash
env RUST_LOG=debug /app/rss-forwarder --debug /app/feeds.toml &
/app/miniserve tests/
#!/bin/bash
env RUST_LOG=debug /app/rss-forwarder --debug /app/feeds.toml &
/app/miniserve tests/
#!/bin/sh
while IFS="" read -r p || [ -n "$p" ]
do
if [[ ${p:0:1} != "#" ]] && [[ $p != "" ]]
then
export "$p"
fi
done < ~/.config/environment.d/${HOSTNAME}.conf
" " vim: set filetype=vim
" " example file https://raw.githubusercontent.com/tridactyl/tridactyl/master/.tridactylrc
set theme auto
set hintautoselect false
set tabclosepinned false
blacklistadd www.fastmail.com
blacklistadd jp.inoreader.com
blacklistadd https://outlook.office.com/mail/
" " for jira
unbind w
unbind .
unbind a
unbind m
" slack
unbind t
bind <C-Space> scrollpage -0.5
bind <Space> scrollpage 0.5
bind ` tabsort --url
autocmd DocStart .* js tri.browserBg.tabs.insertCSS({ code: "a:visited {color: VisitedText !important;}", allFrames: true, cssOrigin: "user"})
autocmd DocLoad .* js tri.browserBg.tabs.insertCSS({ code: "a:visited {color: VisitedText !important;}", allFrames: true, cssOrigin: "user"})
idk how to throw/link these files into the correct place on each machine.
other portable things like mpv, wezterm, yt-dlp have their config files placed next to exe as well.
[author]
name = "hdhoang"
email = "code@hdhoang.space"
#!/bin/sh
while IFS="" read -r p || [ -n "$p" ]
do
if [[ ${p:0:1} != "#" ]] && [[ $p != "" ]]
then
export "$p"
fi
done < ~/.config/environment.d/${HOSTNAME}.conf
" " vim: set filetype=vim
" " example file https://raw.githubusercontent.com/tridactyl/tridactyl/master/.tridactylrc
set theme auto
set hintautoselect false
set tabclosepinned false
blacklistadd www.fastmail.com
blacklistadd jp.inoreader.com
blacklistadd https://outlook.office.com/mail/
" " for jira
unbind w
unbind .
unbind a
unbind m
" slack
unbind t
bind <C-Space> scrollpage -0.5
bind <Space> scrollpage 0.5
bind ` tabsort --url
autocmd DocStart .* js tri.browserBg.tabs.insertCSS({ code: "a:visited {color: VisitedText !important;}", allFrames: true, cssOrigin: "user"})
autocmd DocLoad .* js tri.browserBg.tabs.insertCSS({ code: "a:visited {color: VisitedText !important;}", allFrames: true, cssOrigin: "user"})
idk how to throw/link these files into the correct place on each machine.
other portable things like mpv, wezterm, yt-dlp have their config files placed next to exe as well.
# Blue Oak Model License
Version 1.0.0
## Purpose
This license gives everyone as much permission to work with
this software as possible, while protecting contributors
from liability.
## Acceptance
In order to receive this license, you must agree to its
rules. The rules of this license are both obligations
under that agreement and conditions to your license.
You must not do anything with this software that triggers
a rule that you cannot or will not follow.
## Copyright
Each contributor licenses you to do everything with this
software that would otherwise infringe that contributor's
copyright in it.
## Notices
You must ensure that everyone who gets a copy of
any part of this software from you, with or without
changes, also gets the text of this license or a link to
<https://blueoakcouncil.org/license/1.0.0>.
## Excuse
If anyone notifies you in writing that you have not
complied with [Notices](#notices), you can keep your
license by taking all practical steps to comply within 30
days after the notice. If you do not do so, your license
ends immediately.
## Patent
Each contributor licenses you to do everything with this
software that would otherwise infringe any patent claims
they can license or become able to license.
## Reliability
No contributor can revoke this license.
## No Liability
***As far as the law allows, this software comes as is,
without any warranty or condition, and no contributor
will be liable to anyone for any damages related to this
software or this license, under any kind of legal claim.***