|
Home > Archive > Unix Programming > October 2006 > mkfifo command usage to transfer info between 2 machines.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
mkfifo command usage to transfer info between 2 machines.
|
|
|
| Greetings,
I m trying to use mkfifo command in linux to transfer information from
one process of Machine1 to another process in Machine2. I tried the
following,
Machine1:
unix> mkfifo /network/file_system/user1/test
unix> process1 writes info. in test
Machine2:
unix> process2 try to read the info from
/network/file_system/user1/test but complains info not available.
process2 is not able to read it even though the FIFO is created in the
same file system. Please suggest me to implement the data tranfer
between processes of 2 different machine.
Thanks,
Vad.
| |
| Nils O. Selåsdal 2006-10-12, 1:36 am |
| Vad wrote:
> Greetings,
>
> I m trying to use mkfifo command in linux to transfer information from
> one process of Machine1 to another process in Machine2. I tried the
> following,
>
> Machine1:
> unix> mkfifo /network/file_system/user1/test
> unix> process1 writes info. in test
>
> Machine2:
> unix> process2 try to read the info from
> /network/file_system/user1/test but complains info not available.
>
> process2 is not able to read it even though the FIFO is created in the
> same file system. Please suggest me to implement the data tranfer
> between processes of 2 different machine.
Correct, fifos in linux are only capable of doing IPC over fifos on the
same machine, you cannot use it to communicate with another machine
no matter where you place the fifo.
You need another form of communication, use e.g. TCP.
| |
|
| Thanks for the information. Is there any way we can establish the
connection between these machines to transfer the data?
Thanks,
Vad.
| |
| Nils O. Selåsdal 2006-10-12, 1:36 am |
| Vad wrote:
> Thanks for the information. Is there any way we can establish the
> connection between these machines to transfer the data?
Yes, use the socket api to establish a TCP connection.
| |
|
| I got this working using rsh and cat command,
rsh mac1 cat fifo1 | fifo2
Thanks for your help...
|
|
|
|
|