aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar/status_line.c
diff options
context:
space:
mode:
Diffstat (limited to 'swaybar/status_line.c')
-rw-r--r--swaybar/status_line.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/swaybar/status_line.c b/swaybar/status_line.c
index fb9271f8..71ceb1d0 100644
--- a/swaybar/status_line.c
+++ b/swaybar/status_line.c
@@ -1,4 +1,5 @@
1#define _POSIX_C_SOURCE 200809L 1#define _POSIX_C_SOURCE 200809L
2#include <assert.h>
2#include <fcntl.h> 3#include <fcntl.h>
3#include <sys/ioctl.h> 4#include <sys/ioctl.h>
4#include <json.h> 5#include <json.h>
@@ -153,6 +154,8 @@ struct status_line *status_line_init(char *cmd) {
153 exit(1); 154 exit(1);
154 } 155 }
155 156
157 assert(!getenv("WAYLAND_SOCKET") && "display must be initialized before "
158 " starting `status-command`; WAYLAND_SOCKET should not be set");
156 status->pid = fork(); 159 status->pid = fork();
157 if (status->pid == 0) { 160 if (status->pid == 0) {
158 dup2(pipe_read_fd[1], STDOUT_FILENO); 161 dup2(pipe_read_fd[1], STDOUT_FILENO);