Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8256719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:57:22+00:00 2026-06-08T01:57:22+00:00

mkfifo fifo echo 1 >fifo blocks on last command. I find a explanation of

  • 0

mkfifo fifo
echo 1 >fifo
blocks on last command.

I find a explanation of this in gnu libc

However, it has to be open at both ends simultaneously before you can proceed to do any input or output operations on it. Opening a FIFO for reading normally blocks until some other process opens the same FIFO for writing, and vice versa.

But

>mkfifo fifo  
>exec 5<>fifo  
>echo 1 >&5

doesn’t block and works well. Again AFAIK shells use a dup2 to make redirections but
how does this makes a difference?

Actually I find the answer when I formulated the question. I’ll post it below.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T01:57:24+00:00Added an answer on June 8, 2026 at 1:57 am

    Well the answer is short.

    From my linux distro man 7 fifo

    Under Linux, opening a FIFO for read and write will succeed both in blocking and nonblocking mode. POSIX leaves this behavior undefined.

    So it’s due to <> in redirection.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a new FIFO using the mkfifo command. I have a text file
I am shelling this: mkfifo my_fifo with this permission: prw-r--r-- then I do: echo
Consider the following code: writer.c mkfifo(/tmp/myfifo, 0660); int fd = open(/tmp/myfifo, O_WRONLY); char *foo,
I'm have some php code: <? $cmd=mkfifo /tmp/myfifo;; system($cmd); $cmd=echo 1 > /tmp/myfifo 2>&1
Step 1: I open a terminal and type mkfifo mypipe cat < mypipe Step
I'm trying to find a way to invoke an interactive command-line program so that
How can you create a temporary FIFO (named pipe) in Python? This should work:
I am creating a named pipe using JNI by calling the mkfifo() command. I
I created a fifo pipe $ mkfifo pipename Now if I write somthing into
I'm using FIFO for IPC. However they perform some strange behaviour. As for demostration

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.