restore SIGCHLD sighandler to default before spawning a program
From sigaction(2):
A child created via fork(2) inherits a copy of its parent's signal dispositions.
During an execve(2), the dispositions of handled signals are reset to the default;
the dispositions of ignored signals are left unchanged.
This refused to start directly some programs from configuring in config.h:
Some reported programs that didn't start were: mpv.
Similar to the commit e81f17d4c196aaed6893fd4beed49991caa3e2a4 from dwm.
include X11/keysym.h: improve compatibility with older systems
This matches dwm too.
This makes it compile cleanly on a tested Slackware 11 system.
fix: faulty zombie reaping
issues with the current signal handler:
1. die() isn't async-signal-safe
2. there's a race-window during reinstating the signal handler allowing
zombies to be produced (should be rare in practice).
3. if waitpid fails, it will clobber the errno which can lead to
undesired codepath being taken on the resuming code (this one can
actually occur in practice).
to reproduce the 3rd issue:
~> ./tabbed &
[1] 20644
0x1800003
~> while :; do kill -s SIGCHLD 20644; done >&2 2>/dev/null
XIO: fatal IO error 10 (No child processes) on X server ":0"
after 47 requests (47 known processed) with 0 events remaining.
[1] + exit 1 ./tabbed
set the signal handler to SIG_IGN to reap zombies automatically
(according to POSIX.1-2001).
NOTE: this patch follows dwm's commit 712d663. according to the manpage,
none of the sa_flags being set are meaningful since we're using SIG_IGN.
they used to be meaningful on earlier version of the patch where it was
using SIG_DFL, i've kept them here just in case.
Makefile: whoops add proper comment for OpenBSD
Makefile improvements
* Respect system cflags, ldflags, packages can override them all with
TABBED_{CFLAGS,LDFLAGS}. Remove -Wall and -Os and -s.
* Install README as documentation.
* dist: stream directly to a gzipped tarball.
* options: remove it.
* Add ".POSIX:"
* Remove config.mk
Makefile: simplify and remove hiding the build process
Makefile: add xembed.1 in the dist target
config.h: mark keys as const
Fixed crash when window height was less or equal to bar height
When resizing, the embedded client is being resized to (height = wh - bh),
which is (<= 0) if (wh <= bh). This generates a BadValue Error leading to a
crash. This patch fixes that by hiding the tab bar if the window height is too
small, and also sets a min_height WM hint to prevent that situation from
happening in the first place.
Add OpenBSD support to config.mk
Signed-off-by: Lucas Gabriel Vuotto <lgv@nanashi.co>
Embed dmenu in tabbed own window
Signed-off-by: Lucas Gabriel Vuotto <lgv@nanashi.co>
Fix minor inconsistency in man page
Fix movetab and focusurgent when there's no client
Accessing those would crash with a floating point exception.
Move tab selection keybinding from Ctrl-t to Ctrl-`
One killclient() is enough.
The forgotten half of the last patch.
add -k to close tabbed foreground client on WMDelete
Hello, this is useful when you want to use the same key binding that closes windows to close tabs. I got tired of loosing my tabbed/surf session when I hit my WM's close key. "Last tab" behavior still respects -c/-f.
Cheers
-J
From 829e95855f0fe78a368788a5e72231bd6456a8cf Mon Sep 17 00:00:00 2001
From: jakeogh <github.com@v6y.net>
Date: Mon, 21 Mar 2016 01:36:28 +0000
Subject: [PATCH] add -k to close foreground tabbed client on WM_DELETE_WINDOW
Signed-off-by: Christoph Lohmann <20h@r-36.net>