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 nameslet's use more fool-proof methodsThis 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:```dashpsmisc-22.21# pgrep -fla abcd261 ./0123456789abcd 1h264 ./0123456789abcde 1h267 ./0123456789abcdef 1hpsmisc-22.21# killall -v -0 0123456789abcdKilled 0123456789abcd(261) with signal 0psmisc-22.21# killall -v -0 0123456789abcdeKilled 0123456789abcde(264) with signal 0psmisc-22.21# killall -v -0 0123456789abcdefKilled 0123456789abcdef(267) with signal 0```With debian10, psmisc 23.2:```dashpsmisc-23.2# pgrep -fla abcd322 ./0123456789abcd 1h325 ./0123456789abcde 1h328 ./0123456789abcdef 1hpsmisc-23.2# killall -v -0 0123456789abcdKilled 0123456789abcd(322) with signal 0psmisc-23.2# killall -v -0 0123456789abcdeKilled 0123456789abcde(325) with signal 0Killed 0123456789abcde(328) with signal 0psmisc-23.2# killall -v -0 0123456789abcdef0123456789abcdef: no process found```With debian11, psmisc 23.4:```dashpsmisc-23.4# killall -v -0 0123456789abcdKilled 0123456789abcd(329) with signal 0psmisc-23.4# killall -v -0 0123456789abcdeKilled 0123456789abcde(332) with signal 0Killed 0123456789abcde(335) with signal 0psmisc-23.4# killall -v -0 0123456789abcdefKilled 0123456789abcde(332) with signal 0Killed 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 LicenseVersion 1.0.0## PurposeThis license gives everyone as much permission to work withthis software as possible, while protecting contributorsfrom liability.## AcceptanceIn order to receive this license, you must agree to itsrules. The rules of this license are both obligationsunder that agreement and conditions to your license.You must not do anything with this software that triggersa rule that you cannot or will not follow.## CopyrightEach contributor licenses you to do everything with thissoftware that would otherwise infringe that contributor'scopyright in it.## NoticesYou must ensure that everyone who gets a copy ofany part of this software from you, with or withoutchanges, also gets the text of this license or a link to<https://blueoakcouncil.org/license/1.0.0>.## ExcuseIf anyone notifies you in writing that you have notcomplied with [Notices](#notices), you can keep yourlicense by taking all practical steps to comply within 30days after the notice. If you do not do so, your licenseends immediately.## PatentEach contributor licenses you to do everything with thissoftware that would otherwise infringe any patent claimsthey can license or become able to license.## ReliabilityNo 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 contributorwill be liable to anyone for any damages related to thissoftware or this license, under any kind of legal claim.***
# psmisc 23.x killall doesn't match long process nameslet's use more fool-proof methodsThis 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:```dashpsmisc-22.21# pgrep -fla abcd261 ./0123456789abcd 1h264 ./0123456789abcde 1h267 ./0123456789abcdef 1hpsmisc-22.21# killall -v -0 0123456789abcdKilled 0123456789abcd(261) with signal 0psmisc-22.21# killall -v -0 0123456789abcdeKilled 0123456789abcde(264) with signal 0psmisc-22.21# killall -v -0 0123456789abcdefKilled 0123456789abcdef(267) with signal 0```With debian10, psmisc 23.2:```dashpsmisc-23.2# pgrep -fla abcd322 ./0123456789abcd 1h325 ./0123456789abcde 1h328 ./0123456789abcdef 1hpsmisc-23.2# killall -v -0 0123456789abcdKilled 0123456789abcd(322) with signal 0psmisc-23.2# killall -v -0 0123456789abcdeKilled 0123456789abcde(325) with signal 0Killed 0123456789abcde(328) with signal 0psmisc-23.2# killall -v -0 0123456789abcdef0123456789abcdef: no process found```With debian11, psmisc 23.4:```dashpsmisc-23.4# killall -v -0 0123456789abcdKilled 0123456789abcd(329) with signal 0psmisc-23.4# killall -v -0 0123456789abcdeKilled 0123456789abcde(332) with signal 0Killed 0123456789abcde(335) with signal 0psmisc-23.4# killall -v -0 0123456789abcdefKilled 0123456789abcde(332) with signal 0Killed 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/bashenv RUST_LOG=debug /app/rss-forwarder --debug /app/feeds.toml &/app/miniserve tests/
#!/bin/bashenv RUST_LOG=debug /app/rss-forwarder --debug /app/feeds.toml &/app/miniserve tests/
#!/bin/shwhile IFS="" read -r p || [ -n "$p" ]doif [[ ${p:0:1} != "#" ]] && [[ $p != "" ]]thenexport "$p"fidone < ~/.config/environment.d/${HOSTNAME}.conf
" " vim: set filetype=vim" " example file https://raw.githubusercontent.com/tridactyl/tridactyl/master/.tridactylrcset theme autoset hintautoselect falseset tabclosepinned falseblacklistadd www.fastmail.comblacklistadd jp.inoreader.comblacklistadd https://outlook.office.com/mail/" " for jiraunbind wunbind .unbind aunbind m" slackunbind tbind <C-Space> scrollpage -0.5bind <Space> scrollpage 0.5bind ` tabsort --urlautocmd 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/shwhile IFS="" read -r p || [ -n "$p" ]doif [[ ${p:0:1} != "#" ]] && [[ $p != "" ]]thenexport "$p"fidone < ~/.config/environment.d/${HOSTNAME}.conf
" " vim: set filetype=vim" " example file https://raw.githubusercontent.com/tridactyl/tridactyl/master/.tridactylrcset theme autoset hintautoselect falseset tabclosepinned falseblacklistadd www.fastmail.comblacklistadd jp.inoreader.comblacklistadd https://outlook.office.com/mail/" " for jiraunbind wunbind .unbind aunbind m" slackunbind tbind <C-Space> scrollpage -0.5bind <Space> scrollpage 0.5bind ` tabsort --urlautocmd 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 LicenseVersion 1.0.0## PurposeThis license gives everyone as much permission to work withthis software as possible, while protecting contributorsfrom liability.## AcceptanceIn order to receive this license, you must agree to itsrules. The rules of this license are both obligationsunder that agreement and conditions to your license.You must not do anything with this software that triggersa rule that you cannot or will not follow.## CopyrightEach contributor licenses you to do everything with thissoftware that would otherwise infringe that contributor'scopyright in it.## NoticesYou must ensure that everyone who gets a copy ofany part of this software from you, with or withoutchanges, also gets the text of this license or a link to<https://blueoakcouncil.org/license/1.0.0>.## ExcuseIf anyone notifies you in writing that you have notcomplied with [Notices](#notices), you can keep yourlicense by taking all practical steps to comply within 30days after the notice. If you do not do so, your licenseends immediately.## PatentEach contributor licenses you to do everything with thissoftware that would otherwise infringe any patent claimsthey can license or become able to license.## ReliabilityNo 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 contributorwill be liable to anyone for any damages related to thissoftware or this license, under any kind of legal claim.***