aboutsummaryrefslogtreecommitdiffhomepage
path: root/uzbl.c
diff options
context:
space:
mode:
authorGravatar uranther <jwheaton@purdue.edu>2009-07-16 16:27:18 -0400
committerGravatar uranther <jwheaton@purdue.edu>2009-07-16 16:27:18 -0400
commitaef57075a8ff3b27341d95b424fe8bc948dc456c (patch)
tree0f96b3d305d0c1d91255176c904e253490bd9cfa /uzbl.c
parentf9e93ba19d4d166d81d53e7b4bc222ef8d4e9632 (diff)
Added back in code to check if fifo exists, in case user wants to 'set fifo_dir =' while uzbl is running
Diffstat (limited to 'uzbl.c')
-rw-r--r--uzbl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/uzbl.c b/uzbl.c
index 15d1f1c..81db05a 100644
--- a/uzbl.c
+++ b/uzbl.c
@@ -1951,6 +1951,13 @@ control_fifo(GIOChannel *gio, GIOCondition condition) {
gchar*
init_fifo(gchar *dir) { /* return dir or, on error, free dir and return NULL */
+ if (uzbl.comm.fifo_path) { /* get rid of the old fifo if one exists */
+ if (unlink(uzbl.comm.fifo_path) == -1)
+ g_warning ("Fifo: Can't unlink old fifo at %s\n", uzbl.comm.fifo_path);
+ g_free(uzbl.comm.fifo_path);
+ uzbl.comm.fifo_path = NULL;
+ }
+
GIOChannel *chan = NULL;
GError *error = NULL;
gchar *path = build_stream_name(FIFO, dir);