From: Grigory Batalov <bga@altlinux.ru> To: devel@altlinux.ru Subject: [devel] mkstemp in linpopup (was: NMU: fortune-mod, U: fortunes-ALT) Date: Mon, 2 Jun 2003 14:48:42 +0400 Message-ID: <20030602144842.29128948.bga@altlinux.ru> (raw) In-Reply-To: <20030602081809.GC8759@basalt.office.altlinux.org> On Mon, 2 Jun 2003 12:18:09 +0400 "Dmitry V. Levin" <ldv@altlinux.org> wrote: > > close (file_handle_temp); > > ... > > unlink (temp_filename); > > Race condition. > unlink должен быть сразу после mkstemp, и обязательно до close. А как же тогда писать в файл, если я его сразу удалю? > Похоже на набор граблей, а не на работоспособный код, верно? Ну да, промашка вышла =). Посоветуйте тогда, где взять образец правильной работы с временными файлами (или чем это заменить).
prev parent reply other threads:[~2003-06-02 10:48 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-06-01 22:19 [devel] NMU: fortune-mod, U: fortunes-ALT Alexey I. Froloff 2003-06-01 23:15 ` Grigory Batalov 2003-06-02 7:46 ` Stanislav Ievlev 2003-06-02 18:38 ` Grigory Batalov 2003-06-03 6:20 ` [devel] " Anton V. Boyarshinov 2003-06-02 8:18 ` [devel] " Dmitry V. Levin 2003-06-02 9:02 ` Igor Homyakov 2003-06-02 9:40 ` [devel] " Alexey Tourbin 2003-06-02 10:49 ` [devel] Re: printf(3) Igor Homyakov 2003-06-03 8:07 ` Dmitry V. Levin 2003-06-02 10:48 ` Grigory Batalov [this message]
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=20030602144842.29128948.bga@altlinux.ru \ --to=bga@altlinux.ru \ --cc=devel@altlinux.ru \ /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
ALT Linux Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git