diff options
Diffstat (limited to 'url.c')
-rw-r--r-- | url.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/url.c b/url.c index 21f946c..7da0968 100644 --- a/url.c +++ b/url.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 C. McEnroe <june@causal.agency> +/* Copyright (C) 2020 June McEnroe <june@causal.agency> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -41,6 +41,7 @@ static const char *Pattern = { "(" "cvs|" "ftp|" + "gemini|" "git|" "gopher|" "http|" @@ -98,7 +99,7 @@ static void push(uint id, const char *nick, const char *str, size_t len) { char buf[1024]; snprintf(buf, sizeof(buf), "%.*s", (int)len, str); - styleStrip(&(struct Cat) { url->url, len + 1, 0 }, buf); + styleStrip(url->url, len + 1, buf); } void urlScan(uint id, const char *nick, const char *mesg) { @@ -122,6 +123,7 @@ static void urlOpen(const char *url) { if (pid < 0) err(EX_OSERR, "fork"); if (pid) return; + setsid(); close(STDIN_FILENO); dup2(utilPipe[1], STDOUT_FILENO); dup2(utilPipe[1], STDERR_FILENO); @@ -173,6 +175,7 @@ static void urlCopy(const char *url) { return; } + setsid(); dup2(rw[0], STDIN_FILENO); dup2(utilPipe[1], STDOUT_FILENO); dup2(utilPipe[1], STDERR_FILENO); |