#!/bin/zsh
setopt no_unset extended_glob
zmodload zsh/net/socket

# pre-open this in case the file node would be ovewritten
exec 4</run/service/.s6-svscan/control

if ! zsocket -v -d 3 /tmp/.X11-unix/X${DISPLAY#:}; then
	printf >&2 '%s\n' "FATAL: could not connect to X11 socket, terminating."
	printf q >&4
	# s6-svscanctl -q /run/service
fi
exec cat <&3 >/dev/null