linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Progga <abulfazl@juniv.edu>
To: Glynn Clements <glynn.clements@virgin.net>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: mktemp()
Date: Sun, 6 Jun 2004 04:43:35 +0600	[thread overview]
Message-ID: <20040606044335.C1576@Imrashi.net.bd> (raw)
In-Reply-To: <16578.8728.916755.738458@cerise.nosuchdomain.co.uk>; from glynn.clements@virgin.net on Sat, Jun 05, 2004 at 08:42:16PM +0100

On Sat, Jun 05, 2004 at 08:42:16PM +0100, Glynn Clements wrote:
> 
> Or another process might coincidentally create a file named abc123456
> between the point that mktemp() returns and the point that you try to
> create your file.

 This sounds serious!  I am using this in a server and this can happen 
of course.  A special Thanks for pointing this special case.   Maybe mkstemp()
is the only solution since open() can't be used here ;-(



> This type of situation is known as a "race condition".

 The manpage mentioned this race condition and I didn't understood even after
going through the OS course ;-(   Need to study hard.



 Khoda Hafez
 Progga


  reply	other threads:[~2004-06-05 22:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-05  3:30 mktemp() Progga
2004-06-05  4:55 ` mktemp() Glynn Clements
2004-06-05  8:17   ` mktemp() Progga
2004-06-05 11:16     ` mktemp() Jan-Benedict Glaw
2004-06-05 12:40       ` mktemp() Progga
2004-06-05 13:18         ` mktemp() Jan-Benedict Glaw
2004-06-05 19:42     ` mktemp() Glynn Clements
2004-06-05 22:43       ` Progga [this message]
2004-06-06  9:50 ` mktemp() Martin Olsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040606044335.C1576@Imrashi.net.bd \
    --to=abulfazl@juniv.edu \
    --cc=glynn.clements@virgin.net \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).