GNU bug report logs - #6900
mktemp: want option to make a fifo

Previous Next

Package: coreutils;

Reported by: John Reiser <jreiser <at> bitwagon.com>

Date: Mon, 23 Aug 2010 15:41:01 UTC

Severity: normal

Tags: notabug

Merged with 6330

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 6900 <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: John Reiser <jreiser <at> bitwagon.com>
Cc: 6900 <at> debbugs.gnu.org
Subject: Re: bug#6900: mktemp: want option to make a fifo
Date: Mon, 23 Aug 2010 12:00:50 -0600
On 08/23/2010 11:34 AM, John Reiser wrote:
> On 08/23/2010 09:40 AM, Eric Blake wrote:
>> On 08/23/2010 09:22 AM, John Reiser wrote:
>>> mktemp: Please add an option which creates a fifo
>>>    [snip]
>>
>> Thanks for the report.  However, I'm inclined to mark this bug as a
>> duplicate of 6330, for the reasons already documented in this long thread:
>> http://lists.gnu.org/archive/html/bug-coreutils/2010-06/msg00013.html
>
> The suggested alternative (use "mktemp -d" to create a uniquely-named
> directory, then use mkfifo of an arbitrary fixed name within that directory)
> satisfies only some of the desired properties.  Yes, it's a fifo with
> a safely-created unique name.  However, removing that fifo leaves behind
> the directory, and the directory also occupies its own space [often
> a few kilobytes] even during the lifetime of the fifo.

If we add 'mktemp --fifo', then where do we stop?  What about creating a 
uniquely named symlink?  Or a new shared memory object?

http://lists.gnu.org/archive/html/bug-coreutils/2010-06/msg00033.html

And did you not read in that thread about the arguments that recursively 
moving an entire temporary directory hierarchy with 'rm -rf dir' is just 
as short in shell code as 'rm -f fifo'?  A couple kilobytes of disk 
space for a temporary directory given today's storage technologies is 
not a very convincing argument.

The whole argument of Unix is that each tool does one thing well, so 
that the combination of tools can do everything.  mktemp should NOT be 
bloated just to reproduce the functionality of mkfifo or of ln, when 
those tools can already be paired nicely.

-- 
Eric Blake   eblake <at> redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org




This bug report was last modified 13 years and 350 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.