coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: differece between mkfifo and mknod ... p


From: Peng Yu
Subject: Re: differece between mkfifo and mknod ... p
Date: Sat, 13 Mar 2021 07:56:12 -0600

Thanks. Why is there such a redundancy? Is it for backward compatibility?
If not for backward compatibility, I’d think mknod ... p should be removed,
for this syntax is worse than that of mkfifo.

On Sat, Mar 13, 2021 at 7:48 AM Steeve McCauley <steeve.mccauley@gmail.com>
wrote:

> Ah, sorry, yeah more or less identical when it comes to making the fifo,
>
> $ strace mknod mknod p 2>&1 | grep -i fifo
> mknod("mknod", S_IFIFO|0666)            = 0
> $ strace mkfifo mkfifo 2>&1 | grep -i fifo
> execve("/usr/bin/mkfifo", ["mkfifo", "mkfifo"], 0x7ffe46acfb88 /* 69 vars
> */) = 0
> mknod("mkfifo", S_IFIFO|0666)           = 0
>
> $ ls -l mk*
> prw-r--r-- 1 steeve steeve 0 Mar 13 08:45 mkfifo
> prw-r--r-- 1 steeve steeve 0 Mar 13 08:45 mknod
>
>
>
> On Sat, Mar 13, 2021 at 8:38 AM Peng Yu <pengyu.ut@gmail.com> wrote:
>
>> But my question is the p of mknod and mkfifo. Are they the same or
>> different?
>>
>> On Sat, Mar 13, 2021 at 5:21 AM Steeve McCauley <
>> steeve.mccauley@gmail.com> wrote:
>>
>>> mknod can make character (c) or block (b) or pipe (p) device files (as
>>> found under /dev).
>>>
>>> mkfifo makes "named pipes" so they can behave like files.
>>>
>>> https://en.wikipedia.org/wiki/Named_pipe
>>>
>>> On Sat, Mar 13, 2021 at 12:44 AM Peng Yu <pengyu.ut@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> It seems that both `mkfifo` and `mknod ... p` can create a fifo. What
>>>> is the difference between them? Thanks.
>>>>
>>>> --
>>>> Regards,
>>>> Peng
>>>>
>>>>
>>>
>>> --
>>> :wq
>>>
>> --
>> Regards,
>> Peng
>>
>
>
> --
> :wq
>
-- 
Regards,
Peng


reply via email to

[Prev in Thread] Current Thread [Next in Thread]