ipc: correctly shutdown IPC sockets when exiting/restarting

This commit is contained in:
Michael Stapelberg
2010-03-16 02:44:47 +01:00
parent fca826a6f9
commit f7a1a9fb20
5 changed files with 26 additions and 0 deletions

View File

@ -33,6 +33,7 @@
#include "log.h"
#include "sighandler.h"
#include "manage.h"
#include "ipc.h"
bool focus_window_in_container(xcb_connection_t *conn, Container *container, direction_t direction) {
/* If this container is empty, were done */
@ -1015,6 +1016,7 @@ void parse_command(xcb_connection_t *conn, const char *command) {
if (STARTS_WITH(command, "exit")) {
LOG("User issued exit-command, exiting without error.\n");
restore_geometry(global_conn);
ipc_shutdown();
exit(EXIT_SUCCESS);
}