![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How can I transfer an open file description between two process?
|
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
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.
|
||||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|