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 <[email protected]> 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 <[email protected]> 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 < >> [email protected]> 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 <[email protected]> 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
