summary refs log tree commit diff
path: root/chat.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-08 19:12:05 -0500
committerJune McEnroe <june@causal.agency>2020-02-08 19:12:05 -0500
commit362d779b61adc3f59ef7b4617b3bb7a19f024048 (patch)
treed76e8bfac49b4c750af25dbdeb90f490a8c78ab9 /chat.c
parentImplement URL opening (diff)
downloadcatgirl-362d779b61adc3f59ef7b4617b3bb7a19f024048.tar.gz
catgirl-362d779b61adc3f59ef7b4617b3bb7a19f024048.zip
Set FDs CLOEXEC
Diffstat (limited to '')
-rw-r--r--chat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/chat.c b/chat.c
index ca35d7d..c0c2d28 100644
--- a/chat.c
+++ b/chat.c
@@ -16,6 +16,7 @@
 
 #include <err.h>
 #include <errno.h>
+#include <fcntl.h>
 #include <locale.h>
 #include <poll.h>
 #include <signal.h>
@@ -164,6 +165,10 @@ int main(int argc, char *argv[]) {
 	int error = pipe(procPipe);
 	if (error) err(EX_OSERR, "pipe");
 
+	fcntl(irc, F_SETFD, FD_CLOEXEC);
+	fcntl(procPipe[0], F_SETFD, FD_CLOEXEC);
+	fcntl(procPipe[1], F_SETFD, FD_CLOEXEC);
+
 	struct pollfd fds[3] = {
 		{ .events = POLLIN, .fd = STDIN_FILENO },
 		{ .events = POLLIN, .fd = irc },
ass='logsubject'>Ignore NOTICEs not sent to the channelJune McEnroe 2018-08-03Handle KICK and NICKJune McEnroe 2018-08-03Continue on EINTR from pollJune McEnroe Resizing the terminal causes it. 2018-08-03Handle ACTIONsJune McEnroe 2018-08-03Use more octal char literalsJune McEnroe I might be coming around to octal. 2018-08-03Send a WHO in response to NAMES to get usernamesJune McEnroe Other than this slight hack, I think coloring by username rather than nick is a much better idea. 2018-08-03Colorize nicks and channelsJune McEnroe 2018-08-03Add support for mIRC colorsJune McEnroe 2018-08-03Handle bold, italic, underlineJune McEnroe 2018-08-03Add prift function for "prefix shift"June McEnroe Forgive me. 2018-08-03Link with -lcurseswJune McEnroe 2018-08-02Use libtls "compat" ciphersJune McEnroe irc.mozilla.org, using GnuTLS, doesn't support *any* of the "secure" ciphers! 2018-08-02Add UI and handle some kinds of server messagesJune McEnroe Seems like handling input is going to be the worst thing ever. 2018-08-02Add chroot.tar targetJune McEnroe