Date: Tue, 6 Jun 2000 09:50:02 -0700 (PDT) From: Ade Lovett <ade@FreeBSD.org> To: freebsd-ports@FreeBSD.org Subject: Re: ports/19047: net/arpwatch patched to use tmpfile() instead of mktemp() Message-ID: <200006061650.JAA20097@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/19047; it has been noted by GNATS. From: Ade Lovett <ade@FreeBSD.org> To: mi@privatelabs.com Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: ports/19047: net/arpwatch patched to use tmpfile() instead of mktemp() Date: Tue, 6 Jun 2000 11:47:22 -0500 On Tue, Jun 06, 2000 at 09:40:02AM -0700, mi@privatelabs.com wrote: > Because I need FILE * instead of a file descriptor and because I think > the name tmpfile is easier to understand then mkstemp. int fd = mkstemp( blah-blah ); FILE *fp = fdopen( fd, mode ); And from tmpfile(3): BUGS: These interfaces are provided for System V and ANSI compatibility only. The mkstemp(3) interface is strongly preferred. [...] Then go on and read about the race conditions etc.. use mkstemp(), that's what it's there for. -aDe -- Ade Lovett, Austin, TX. ade@FreeBSD.org FreeBSD: The Power to Serve http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006061650.JAA20097>