send sighup to autostart processes
ci/woodpecker/tag/woodpecker Pipeline was successful Details

This commit is contained in:
Luca Bilke 2024-02-23 15:22:47 +01:00
parent 043937918d
commit f621f9e603
No known key found for this signature in database
GPG Key ID: B753481DA0B6FA47
4 changed files with 22 additions and 4 deletions

View File

@ -8,6 +8,10 @@ steps:
commands:
- cp -f config.mk patches.h dwm-flexipatch/
- bash flexipatch-finalizer/flexipatch-finalizer.sh -r -d dwm-flexipatch -o dwm-final
- |
for patch in patches/*.patch; do
patch -d dwm-final <"$patch"
done
- cp -f config.h dwm-final/
- cd dwm-final || exit 1
- make clean install DESTDIR="$${CI_WORKSPACE}/pkg" PREFIX="/usr"

View File

@ -3,9 +3,9 @@
cp config.mk patches.h dwm-flexipatch/
flexipatch-finalizer/flexipatch-finalizer.sh -r -d dwm-flexipatch -o dwm-final
rm dwm-flexipatch/config.mk dwm-flexipatch/patches.h
# for patch in patches/*.diff; do
# patch -d dwm-final <"$patch"
# done
for patch in patches/*.diff; do
patch -d dwm-final <"$patch"
done
cp config.h dwm-final/
cd dwm-final
cd dwm-final || exit 1
make

View File

@ -135,6 +135,7 @@ static const char *layoutmenu_cmd = "xmenulayout";
// static const char *layoutxmenu = "$HOME/.local/libexec/dwm/xmenulayout"; // TODO: Patch layoutmenu to accept arguments
// static const char *layoutdmenu = "$HOME/.local/libexec/dwm/dmenulayout"; // TODO: Patch layoutmenu to accept shell commands
static const int autostart_kill_signal = SIGHUP;
static const char *const autostart[] = {
"/bin/sh", "-c", "run-parts \"${XDG_CONFIG_HOME}/dwm/autorun.d\"", NULL,
"/bin/sh", "-c", "runsvdir \"${SVDIR}\"", NULL,

View File

@ -0,0 +1,13 @@
diff --git a/dwm.c b/dwm.c
index 46b3be6..060614e 100644
--- a/dwm.c
+++ b/dwm.c
@@ -693,7 +693,7 @@ cleanup(void)
/* kill child processes */
for (i = 0; i < autostart_len; i++) {
if (0 < autostart_pids[i]) {
- kill(autostart_pids[i], SIGTERM);
+ kill(autostart_pids[i], autostart_kill_signal);
waitpid(autostart_pids[i], NULL, 0);
}
}