How can I peek named pipe (fifo) under Linux?

How can I peek named pipe (fifo) under Linux?

Post by Alexei Tarassio » Thu, 04 Jul 2002 05:31:35



Hi All,

I use ioctl(fd,I_PEEK,&peekstr) call where
fd - fifo file descriptor,
peekstr - strpeek structure.
I was trying various settings for peekstr
fields but results are the same - EINVAL error.

What I do wrong?

Thank you,
Alexei

 
 
 

How can I peek named pipe (fifo) under Linux?

Post by Michael Kerri » Thu, 04 Jul 2002 14:26:10



Quote:>Hi All,

>I use ioctl(fd,I_PEEK,&peekstr) call where
>fd - fifo file descriptor,
>peekstr - strpeek structure.
>I was trying various settings for peekstr
>fields but results are the same - EINVAL error.

As far as I know this feature just isn't available in Linux

Cheers

Michael

 
 
 

How can I peek named pipe (fifo) under Linux?

Post by Andrey Koubyche » Thu, 04 Jul 2002 16:02:07


Hello Alexei,

Named pipe is not available in linux. Recently I've implemented some
interprocess process with named pipes on win32, and found partial
replacement for it on linux - unix domain sockets.

--
Best regards,
Andrey Koubychev

 
 
 

How can I peek named pipe (fifo) under Linux?

Post by Michael Kerri » Thu, 04 Jul 2002 22:57:21



>Hello Alexei,

>Named pipe is not available in linux. Recently I've implemented some
>interprocess process with named pipes on win32, and found partial
>replacement for it on linux - unix domain sockets.

Named pipes certainly are available on Linux...  (See man 3 mkfifo)

Cheers

Michael

 
 
 

How can I peek named pipe (fifo) under Linux?

Post by Kenny McCorma » Thu, 04 Jul 2002 23:33:23




>Hello Alexei,

>Named pipe is not available in linux.

This is, of course, patently false.

Quote:>Recently I've implemented some interprocess process with named pipes
>on win32, and found partial replacement for it on linux - unix domain
>sockets.

One frequently finds that Windows takes Unix concepts and mucks them up
with so many additional features that people brought up on MS can not
recognize these features in their native habitat (i.e., in Unix).
 
 
 

How can I peek named pipe (fifo) under Linux?

Post by Alexei Tarassio » Fri, 05 Jul 2002 04:02:02




> >Hello Alexei,

> >Named pipe is not available in linux. Recently I've implemented some
> >interprocess process with named pipes on win32, and found partial
> >replacement for it on linux - unix domain sockets.

> Named pipes certainly are available on Linux...  (See man 3 mkfifo)

Thank you all.
I can create (mkfifo) named pipe and perform some open/close
read/write operations on Linux.
The goal of my question was - how can I determine any data available
for reading?
On Solaris (SPARC and/or Intel) I used ioctl function described in my
1st message but seems this call does not work on Linux.

Thanks again,
Alexei

Quote:

> Cheers

> Michael

 
 
 

How can I peek named pipe (fifo) under Linux?

Post by Donald McLachl » Fri, 05 Jul 2002 04:29:13





> > >Hello Alexei,

> > >Named pipe is not available in linux. Recently I've implemented some
> > >interprocess process with named pipes on win32, and found partial
> > >replacement for it on linux - unix domain sockets.

> > Named pipes certainly are available on Linux...  (See man 3 mkfifo)

> Thank you all.
> I can create (mkfifo) named pipe and perform some open/close
> read/write operations on Linux.
> The goal of my question was - how can I determine any data available
> for reading?
> On Solaris (SPARC and/or Intel) I used ioctl function described in my
> 1st message but seems this call does not work on Linux.

maybe man select() or man poll() is what you are looking for.

--

Communications Research Centre / RNS    Tel     (613) 998-2845
3701 Carling Ave.,                      Fax     (613) 998-9648
Ottawa, Ontario
K2H 8S2
Canada

 
 
 

How can I peek named pipe (fifo) under Linux?

Post by David Schwart » Fri, 05 Jul 2002 10:19:20



> Hi All,

> I use ioctl(fd,I_PEEK,&peekstr) call where
> fd - fifo file descriptor,
> peekstr - strpeek structure.
> I was trying various settings for peekstr
> fields but results are the same - EINVAL error.

> What I do wrong?

> Thank you,
> Alexei

        What is your outer problem? You should never need to do this. Just read
the data.

        DS

 
 
 

How can I peek named pipe (fifo) under Linux?

Post by Nils O. Sel?sda » Fri, 05 Jul 2002 21:42:01


In reply to Alexei Tarassiouk:





>> >Hello Alexei,

>> >Named pipe is not available in linux. Recently I've implemented some
>> >interprocess process with named pipes on win32, and found partial
>> >replacement for it on linux - unix domain sockets.

>> Named pipes certainly are available on Linux...  (See man 3 mkfifo)

> Thank you all.
> I can create (mkfifo) named pipe and perform some open/close
> read/write operations on Linux.
> The goal of my question was - how can I determine any data available
> for reading?

Use select or poll.

--

System Developer, UtelSystems a/s
w w w . u t e l s y s t e m s . c o m

 
 
 

How can I peek named pipe (fifo) under Linux?

Post by those who know me have no need of my nam » Tue, 09 Jul 2002 17:10:28


in comp.unix.programmer i read:



>>Named pipe is not available in linux.

>This is, of course, patently false.

what it is a terminology problem, as you noted later but didn't apply to
this part of your response.  the `named pipes' that win32 provides are
sufficiently different from what linux (and unix) provides that one might
as well consider them different things.  there is no implementation ms'
notion of named pipes for any other platform, of which i am aware.

--
bringing you boring signatures for 17 years

 
 
 

How can I peek named pipe (fifo) under Linux?

Post by Kenny McCorma » Tue, 09 Jul 2002 23:59:25




>in comp.unix.programmer i read:


>>>Named pipe is not available in linux.

>>This is, of course, patently false.

>what it is a terminology problem, as you noted later but didn't apply to
>this part of your response.  the `named pipes' that win32 provides are
>sufficiently different from what linux (and unix) provides that one might
>as well consider them different things.  there is no implementation ms'
>notion of named pipes for any other platform, of which i am aware.

Indeed.  And I wouldn't be surprised if next some Windows programmer claims
that Linux doesn't have any C compiler (since the one that comes on Windows
platforms is so different...)
 
 
 

1. Please Help - Linux:Having trouble using fifo (named pipes)

   I'm trying to get two processes to communicate using a fifo. The
problem is that the processes have different UID and the one that makes
the call to mknod() doesn't grant write-permissions on the fifo to other
users, no mather how I set the permissions.
   The call is like this:

        mknod(FIFO_NAME, S_IFIFO|0666, 0);

   For the other process to write to the fifo (which is my intention) I
have to do a chmod directly on the shell to alter the fifo's permission.
   Could someone please tell me what I'm doing wrong or if there is
something that I should be doing that I don't know about?

Thank you.
+--------------------------------------------------+
|     Miguel Eduardo Cardoso Ferreira da Costa     |
+--------------------------------------------------+
|     www: http://caravela.di.fc.ul.pt/~i21118     |

+--------------------------------------------------+

2. proFTPd ?? SAVE ME PLEASE

3. syslogd pipe to named fifo, how?

4. troubles with compiling kdelibs

5. FIFO - named pipes problem

6. 2.4.2-SMP: problem locking nfs files mounted on HPUX (ENOLCK)

7. IPC with FIFO's (named pipes)

8. Creating a wrapper for 'stat'

9. Named pipe (FIFO) fills up

10. Shells and FIFO's (named pipes).

11. named pipes / select / fifo

12. named pipe (fifo) file size always zero

13. fifo named pipe and ftp