dwl icon indicating copy to clipboard operation
dwl copied to clipboard

waitpid for Xwayland fork failed: No child processes

Open jbeich opened this issue 3 years ago • 5 comments

After building with -DXWAYLAND starting X11 apps still fails. Xwayland in other compositors works fine: sway, hikari, wayfire, cage, river, labwc, kwin_wayland, mutter, arcan-wayland.

$ dwl &
$ glxgears
Error: couldn't open display :0
[...]
00:00:11.336 [xwayland/server.c:92] Starting Xwayland on :0
00:00:11.448 [types/wlr_surface.c:741] New wlr_surface 0x820961a00 (res 0x82094df80)
00:00:11.451 [xwayland/server.c:243] waitpid for Xwayland fork failed: No child processes
(EE) failed to read Wayland events: Broken pipe
$ cc --version
FreeBSD clang version 13.0.0 ([email protected]:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin

$ pkg info -x dwl wayland wlroots
dwl-0.2.2
wayland-1.20.0
wayland-protocols-1.24
xwayland-devel-21.0.99.1.156
wlroots-0.15.0_1

jbeich avatar Dec 31 '21 14:12 jbeich

Any update on this? I'm having the same issue on even on Linux rather than FreeBSD.

KNIX3 avatar Mar 24 '22 01:03 KNIX3

The problem is caused because we setup a SIGCHLD handler.

I think we can fix it with a double fork in spawn()

sevz17 avatar Mar 28 '22 23:03 sevz17

Could you check to see if the recently merged #212 fixes the issue?

djpohly avatar Mar 29 '22 21:03 djpohly

I confirm, works fine after e08bd1292288 but the commit is not in main branch.

jbeich avatar Mar 29 '22 21:03 jbeich

Do you plan to merge e08bd1292288 into main branch? I'd like to avoid having to rebase it downstream:

$ git checkout v0.3 && git cherry-pick -x e08bd1292288
Auto-merging dwl.c
[detached HEAD c7b5bb7] make sure to leave XWayland process waitable
 Author: Devin J. Pohly <[email protected]>
 Date: Tue Mar 29 15:55:06 2022 -0500
 1 file changed, 7 insertions(+), 2 deletions(-)


$ git checkout main && git cherry-pick -x e08bd1292288
Auto-merging dwl.c
CONFLICT (content): Merge conflict in dwl.c
error: could not apply e08bd12... make sure to leave XWayland process waitable
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

jbeich avatar Apr 09 '22 17:04 jbeich