linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Why no flag to unlink a file on creation?
@ 2012-03-27 13:29 Jann Horn
       [not found] ` <1332854971.15139.10.camel-kHgebVDnKAGa6lf8Wg2v7Z5kstrrjoWp@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Jann Horn @ 2012-03-27 13:29 UTC (permalink / raw)
  To: linux-api-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 493 bytes --]

Hello,
I'm not too familiar with the internals of the kernel, so this question
might be stupid, and I'm not sure whether this is the right place to ask
about it, but anyway:
Why is there no flag for the "open" syscall to specify that you want the
file you're opening to be deleted? I think that it would be very useful
in combination with O_CREAT - you could create temporary files without
actually leaving files on the filesystem, given that the filesystem
supports it.

Jann Horn

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Why no flag to unlink a file on creation?
       [not found] ` <1332854971.15139.10.camel-kHgebVDnKAGa6lf8Wg2v7Z5kstrrjoWp@public.gmane.org>
@ 2012-03-27 13:40   ` Carlos O'Donell
  0 siblings, 0 replies; 2+ messages in thread
From: Carlos O'Donell @ 2012-03-27 13:40 UTC (permalink / raw)
  To: Jann Horn; +Cc: linux-api-u79uwXL29TY76Z2rM5mHXA

On Tue, Mar 27, 2012 at 9:29 AM, Jann Horn <jannhorn-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:
> Hello,
> I'm not too familiar with the internals of the kernel, so this question
> might be stupid, and I'm not sure whether this is the right place to ask
> about it, but anyway:
> Why is there no flag for the "open" syscall to specify that you want the
> file you're opening to be deleted? I think that it would be very useful
> in combination with O_CREAT - you could create temporary files without
> actually leaving files on the filesystem, given that the filesystem
> supports it.

The open() function behaviour is dictated both by POSIX and ISO C.

You really want to ask this on either the related C library mailing
list or the related POSIX standards group mailing list.

libc-help-9JcytcrH/bA+uJoB2kUjGw@public.gmane.org - The GNU C Library help mailing list.
* List for discussing GNU C Library issues and ISO C11 questions.
* http://www.gnu.org/software/libc/libc.html

or

austin-group-l-7882/jkIBncuagvECLh61g@public.gmane.org - Austin Common Standards Revision List.
* List for discussing POSIX related issues
* http://www.opengroup.org/austin/lists.html

Cheers,
Carlos.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-27 13:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-27 13:29 Why no flag to unlink a file on creation? Jann Horn
     [not found] ` <1332854971.15139.10.camel-kHgebVDnKAGa6lf8Wg2v7Z5kstrrjoWp@public.gmane.org>
2012-03-27 13:40   ` Carlos O'Donell

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).