$OpenBSD: patch-src_cookies_c,v 1.7 2013/04/19 14:33:51 bcallah Exp $
--- src/cookies.c.orig	Sun Jan 27 12:26:38 2013
+++ src/cookies.c	Thu Apr 18 12:25:04 2013
@@ -94,6 +94,9 @@ static FILE *Cookies_fopen(const char *filename, char 
 
          MSG("Cookies: Created file: %s\n", filename);
          F_in = fopen(filename, "r");
+
+         /* set close on exec */
+         fcntl(fileno(F_in), F_SETFD, FD_CLOEXEC | fcntl(fileno(F_in), F_GETFD));
       } else {
          MSG("Cookies: Could not create file: %s!\n", filename);
       }
