From owner-freebsd-questions Sun May 14 13:53:23 2000 Delivered-To: freebsd-questions@freebsd.org Received: from po3.wam.umd.edu (po3.wam.umd.edu [128.8.10.165]) by hub.freebsd.org (Postfix) with ESMTP id E728B37B694 for ; Sun, 14 May 2000 13:53:20 -0700 (PDT) (envelope-from howardjp@wam.umd.edu) Received: from rac10.wam.umd.edu (root@rac10.wam.umd.edu [128.8.10.150]) by po3.wam.umd.edu (8.9.3/8.9.3) with ESMTP id QAA12690; Sun, 14 May 2000 16:52:56 -0400 (EDT) Received: from rac10.wam.umd.edu (sendmail@localhost [127.0.0.1]) by rac10.wam.umd.edu (8.9.3/8.9.3) with SMTP id QAA29655; Sun, 14 May 2000 16:53:15 -0400 (EDT) Received: from rac10.wam.umd.edu (howardjp@localhost) by rac10.wam.umd.edu (8.9.3/8.9.3) with ESMTP id QAA29650; Sun, 14 May 2000 16:53:15 -0400 (EDT) Message-Id: <200005142053.QAA29650@rac10.wam.umd.edu> X-Authentication-Warning: rac10.wam.umd.edu: howardjp owned process doing -bs To: Lyndon Nerenberg Cc: freebsd-questions@freebsd.org Subject: Re: mktemp() vs. mkstemp() In-reply-to: Your message of "Sun, 14 May 2000 13:09:44 MDT." <200005141909.e4EJ9iN09199@orthanc.ab.ca> Date: Sun, 14 May 2000 16:53:14 -0400 From: James Howard Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <200005141909.e4EJ9iN09199@orthanc.ab.ca>, Lyndon Nerenberg writes: > Is it that much work to add > > if ((stream=fdopen(fd, mode)) == NULL) > err(...); > > after a mkstemp call? If you use it that much you can define a function > in your application. There's no need to add a non-portable routine > to libc for this. No, but by that argument, we shouldn't have getusershell() either. Besides, this port needs it twice. Wouldn't sticking it in libc once instead of in a patch in the ports collection twice save CVS space? Also, a lot of ports complain about this. For instance, in LyX, we see lyx_cb.o: In function `AutoSave(void)': lyx_cb.o(.text+0x73ee): warning: tmpnam() possibly used unsafely; consider using mkstemp() Is there time when it is inapprpriate to "fix" the behaviour of the port? Thanks, Jamie To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message