Re: [PATCH x86_64] Live Patching Function on 2.6.11.7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In article <[email protected]>,
Takashi Ikebe  <[email protected]> wrote:
>Chris Wedgwood wrote:
>> On Wed, Apr 20, 2005 at 04:35:07PM +0900, Takashi Ikebe wrote:> 
>> 
>>>To takeover the application status, connection type
>>>communications(SOCK_STREAM) are need to be disconnected by close().
>>>Same network port is not allowed to bind by multiple processes....
>> 
>> 
>> AF_UNIX socket with SCM_RIGHTS
>> 
>hmm.. most internet base services will use TCPv4 TCPv6 SCTP...
>AF_UNIX can not use as inter-nodes communication.

No, Chris means filedescriptor passing.

You can pass any existing open filedescriptor to another process
using an AF_UNIX socket.

For example, the existing running process creates a UNIX socket in
/var/run/mysocket that the new process can connect() to. The
processes can then not only exchange all kinds of information,
the old process can even send open filedescriptors over to
the new process without closing/re-opening.

See "man 7 unix", ANCILLARY MESSAGES -> SCM_RIGHTS

ANCILLARY MESSAGES
       Ancillary data is sent and received using  sendmsg(2)  and  recvmsg(2).
       For  historical  reasons  the  ancillary message types listed below are
       specified with a SOL_SOCKET type even though they are PF_UNIX specific.
       To  send  them  set  the  cmsg_level  field  of  the  struct cmsghdr to
       SOL_SOCKET and the cmsg_type field to the type.  For  more  information
       see cmsg(3).


       SCM_RIGHTS
              Send or receive a set of open file descriptors from another pro-
              cess.  The data portion contains an integer array  of  the  file
              descriptors.   The passed file descriptors behave as though they
              have been created with dup(2).

Mike.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux