[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to make a temp fifo?
From: |
Peng Yu |
Subject: |
Re: How to make a temp fifo? |
Date: |
Fri, 11 Nov 2011 12:54:33 -0600 |
On Fri, Nov 11, 2011 at 12:47 PM, Eric Blake <address@hidden> wrote:
> On 11/11/2011 11:41 AM, Peng Yu wrote:
>> On Fri, Nov 11, 2011 at 12:38 PM, Eric Blake <address@hidden> wrote:
>>>
>>> On 11/11/2011 11:36 AM, Peng Yu wrote:
>>>> Hi,
>>>>
>>>> I'm wondering if there is a way to make a temp fifo. I could use the
>>>> following to generate a temp fifo. But I'm wondering what is the
>>>> safest way to generate a temp fifo.
>>>
>>> dir=$(mktemp -d)
>>> file=$dir/file
>>> mkfifo $file
>>>
>>> <do something>
>>>
>>> rm -rf $dir
>>
>> Why a temp directory has to be created?
>
> Because there are only two standardized temporary creation functions -
> mkstemp (regular files) and mkdtemp (directories); once you have a
> secure temporary directory, you can create all sorts of other temporary
> files, including fifos, within that directory.
>
>>
>>> This discussion has come up before in the mailing lists; search the
>>> archives.
>>
>> Nothing returns when I searched. Did I do something wrong.
>
> Ah, you searched 'coreutils' instead of 'bug-coreutils', where you would
> have found:
>
> https://lists.gnu.org/archive/html/bug-coreutils/2010-06/msg00033.html
Now, I remember that coreutils didn't exist before. The emails were
all to bug-coreutils.
--
Regards,
Peng