Program for Inter-Process Communication using named pipes || mkfifo

preview_player
Показать описание
In this lecture on Program for Inter-Process Communication using named pipes, you will learn how to pass messages between two processes using mkfifo.
mkfifo() creates a named pipe which can be used exactly like a file. So, if you know how to read/write in a file this is a convenient method for IPC. The advantage is that this FIFO special file can be used by any process for reading or writing just like a normal file. This means to sender process can use the write() system call to write data into the pipe and the receiver process can use the read() system call to read data from the pipe, hence, completing the communication.



Reference Videos:

Tools Required:
1. Linux environment
2. Basic knowledge of C Language
3. gcc compiler installed

Reference Links:

Other Playlists:

Was this tutorial about Program for Inter-Process Communication using named pipes helpful? If so, please share. Let me know your thoughts in the comments.

#linux #oslab #os #dextutor #ipc
Рекомендации по теме
Комментарии
Автор

Sir...wonderful lecture..so far i have seen only big and tough progs on this topic..it is the first time here i saw someone explaining this as easily and moreover with such a simple prog which is easy for everyone to understand....great work sir...

aninditasaha
Автор

One of the concise and best lecture upto the mark

abuzarmohsin
Автор

Sir plz make lectures on Message Queue and Shared Memory as well.

SanjayKumar-Engineer
Автор

Thanks for explanation. I am using Linux Apollo server, but when I run your sender and receiver programs, I get this error and the ‘Message’ is not printed. Secondly, when I run sender separately, I get the output output but in mkfifo I should not get the output when i only run the sender process alone. Please let me know if i am making any mistake. Thanks!

./p2 & ./p3
[2] 17806
Reader process 17807 started
Data received by receiver 17807 is:
[1] Exit 35 ./p2
Sender Process 17806 sent the data

smartconstructionlab
Автор

Can you please create a video on how to do this in MQL4? Just a simple send and receive. I want to send information from one EA installed on a MetaTrader 4 'terminal A' to the EA installed on 'terminal B' (Both the terminals are on the same computer.)

souldetox
Автор

can we use named pipes to communicate with parent and child process?

saikiranreddymannem
Автор

Sir It doesn't pass the "Message" word in the receiver it works like NONBLOCK but it's not can you help me sir?

sandhya
Автор

Sir I am facing a problem to create named pipes.
I used "mkfifo fifo1" command to create a named pipe but I got an error message "mkfifo: cannot create fifo 'fifo1': Operation not permitted".
I tried to create a named pipe using program but it didn't work. mkfifo("pipe_name", 0777) function returned -1.
How can I resolve this?
Thank you in advance.

ankitpodder
Автор

if my server pipe file created great but server works but still waiting for clients to connect using Putty...help!! thx

Chris-nqri
Автор

Sir if possible then please provide a class about permission.you say that 0777 means you give all permission if we want to change then what kind of number we write? Otherwise if you have any resources then please provide us.
Thank you sir 🙏🙏

rajkumardas
Автор

I have done the same program but no message is printed, can you tell me the reason?

jayasharma
join shbcf.ru