=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mail/names.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- src/usr.bin/mail/names.c 2013/04/29 00:28:23 1.19 +++ src/usr.bin/mail/names.c 2014/08/15 03:51:40 1.20 @@ -1,4 +1,4 @@ -/* $OpenBSD: names.c,v 1.19 2013/04/29 00:28:23 okan Exp $ */ +/* $OpenBSD: names.c,v 1.20 2014/08/15 03:51:40 guenther Exp $ */ /* $NetBSD: names.c,v 1.5 1996/06/08 19:48:32 christos Exp $ */ /* @@ -240,7 +240,7 @@ senderr++; goto cant; } - image = open(tempname, O_RDWR); + image = open(tempname, O_RDWR | O_CLOEXEC); (void)rm(tempname); if (image < 0) { warn("%s", tempname); @@ -248,7 +248,6 @@ (void)Fclose(fout); goto cant; } - (void)fcntl(image, F_SETFD, FD_CLOEXEC); fprintf(fout, "From %s %s", myname, date); puthead(hp, fout, GTO|GSUBJECT|GCC|GNL); while ((c = getc(fo)) != EOF)