This is an automated email generated because a ref change occurred in the
git repository for project wmaker-crm.git.
The branch, master has been updated
via 189679b49c601710477d2d48c5a96ccb4faf70eb (commit)
from e45a3bc07d6356f57329c214e3fb32b87ad77669 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 189679b49c601710477d2d48c5a96ccb4faf70eb
Author: David Maciejak <
david.m...@gmail.com>
Date: Sun, 15 Feb 2026 14:03:16 -0500
URL: <
https://repo.or.cz/wmaker-crm.git/189679b49c601710>
wmaker: don't exit wmaker if app child process errored
This patch is fixing a possible memory corruption and abnormal exit
of wmaker when a created child process errored.
This had been kind of mentioned at
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040643
and I also experienced it with especially Steam.
At first, I also thought it was a crash or a memory corruption,
but gdb or valgrind are not reporting anything.
In fact, Steam is not setting properly some hints and that is bringing
some issues. More patches will be needed to support that app properly.
For example, WM_COMMAND is not set properly and when you are trying to
relaunch the app from the appIcon the child process is generating an error
and the actual code is calling Exit(-1) which is entirely exiting wmaker,
that's why from gdb you can see the message
[Inferior 4 (process 567278) exited normally] and no crash.
---
src/main.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/main.c b/src/main.c
index 7bc8bcdb7c71..e382a7be141f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -326,7 +326,8 @@ void ExecuteShellCommand(WScreen *scr, const char *command)
#endif
execl(shell, shell, "-c", command, NULL);
werror("could not execute %s -c %s", shell, command);
- Exit(-1);
+ /* exec failed in child -- exit immediately without running parent cleanup */
+ _exit(127);
} else if (pid < 0) {
werror("cannot fork a new process");
} else {
@@ -377,10 +378,10 @@ Bool RelaunchWindow(WWindow *wwin)
setsid();
#endif
/* argv is not null-terminated */
- char **a = (char **) malloc(argc + 1);
+ char **a = malloc((argc + 1) * sizeof(char *));
if (! a) {
werror("out of memory trying to relaunch the application");
- Exit(-1);
+ _exit(127);
}
int i;
@@ -389,7 +390,8 @@ Bool RelaunchWindow(WWindow *wwin)
a[i] = NULL;
execvp(a[0], a);
- Exit(-1);
+ /* exec failed in child -- exit immediately */
+ _exit(127);
} else if (pid < 0) {
werror("cannot fork a new process");
-----------------------------------------------------------------------
Summary of changes:
src/main.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
repo.or.cz automatic notification. Contact project admin
crm...@gmail.com
if you want to unsubscribe, or site admin
ad...@repo.or.cz if you receive
no reply.
--
wmaker-crm.git ("The Window Maker window manager")