lkml.org 
[lkml]   [1997]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: sendmsg/recvmsg question
Date
Mike Kilburn once wrote:
>
>
>
> On Wed, 12 Feb 1997, Bill Perkins wrote:
>
> > I am trying to set up a simple program using sendmsg(), to eventually share open
> > file descriptors between processes. I've looked through the Stevens books, and even
> > peered at the kernel a trifle, and so far have come up with nothing.
> > sendmsg() returns 0 bytes sent, recvmsg() (of course) comes back with 0 bytes read.
> > Is sendmsg() broken in the kernel (2.0.28) or in libc (5.4.17, the latest I could find)?
>
> Why not use read/write? I have often wondered why sendmsg/recvmsg are even
> around.
>

One can not pass open file descriptors around with read/write. I wrote a program
that uses sendmsg/recvmsg for non-Linux platform. At the time these functions
didn't support passing fd's under Linux, so I had to open /proc/NNNN/fd/x.


--
_. _ .
(_ ,_ _ , . / ` _ _L | Email: Oleg Kibirev <snowcat@netgate.net>
._)| U(_)\/\/ \_,(_L/L | Visit http://math.math.CSUFresno.EDU/~oleg/math.html
------------------------' to get my programs + PGP public key

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.025 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site