The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
2 way and 4 way Hardware Description praveenr AIX 1 12-24-2007 12:12 PM
Max No of Open File Descriptors in a process lakshmankumar12 UNIX for Advanced & Expert Users 2 12-29-2004 08:54 PM
Should a UNIX daemon process close open fds? kunalashar UNIX for Dummies Questions & Answers 1 10-24-2002 06:10 AM
How to change File Description PearPie UNIX for Dummies Questions & Answers 4 09-20-2001 10:00 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 01-17-2002
Registered User
 

Join Date: Jan 2002
Posts: 1
Question transfer an open file description between two process

How can I transfer an open file description between two process?
Reply With Quote
Forum Sponsor
  #2  
Old 01-17-2002
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,658
The two processes must connect to each other by using a unix domain socket. Then the process that has the open file descriptor needs in invoke the sendmsg() system call. The receiving process invokes the recvmsg() system call. When you look up these system calls, they will talk about passing "access rights". That refers to this concept. Actually, the file descriptor itself isn't passed. It's just that the receiving program opens a file descriptor that points to the same entry in the file table as the file descriptor that was used in the sendmsg(). So in most cases it won't be the numerically same fd.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:28 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0