transfer an open file description between two process

Thread Tools Search this Thread
Top Forums Programming transfer an open file description between two process
# 1  
Old 01-17-2002
Question transfer an open file description between two process

How can I transfer an open file description between two process?
# 2  
Old 01-17-2002
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cryption and description for csv file

Hi, Requirement is encrypt key should pick value from file instead of passing their in command. how can i create .p file which contains crypt value. i.e. crypt <trade.csv> tr.x $CKEY fcrypt.p crypt < tr.x $CKEY fcrypt.p i want to encrypt and decrpt csv file and i am using following... (2 Replies)
Discussion started by: rizwan.shaukat
2 Replies

2. SCO

sco unix backward compatibility on "max open file per process"

Hi How to increase maximum number of open file in "sco xenix binary" running in "sco unix openserver 5.0.7" ? I have changed "NOFILES" kernel parameter to 512, but xenix binray can't open more than 60. tnx (4 Replies)
Discussion started by: javad1_maroofi
4 Replies

3. Shell Programming and Scripting

check if some file is in copy process, then transfer it

my user copy large files, and it's take 10min for file to be copied to the server (/tmp/user/ files/), if in the meantime start my scheduled script, then it will copy a part of some file to server1 my idea is to check the file size twice in a short period (1-2 seconds) of time, then compare, if... (5 Replies)
Discussion started by: waso
5 Replies

4. Red Hat

cannot set user id: Resource temporarily unavailable (not open file/open process related)

First post, sorry to be a bother but this one has been dogging me. I have a process user (java application server) that trips a resource limit every couple weeks and need help finding what limit we're hitting. First, this is what's running: This is the error when jobs are run or the... (0 Replies)
Discussion started by: Katahdin
0 Replies

5. Solaris

file open/read/write/close/access by process

Hi want to know what file (descriptor+filename+socket) is being accessed by particular process on solaris. Purpose : while running perf. test, needs to find where is the bottleneck. We are providing concurrnet load for around 1 hr and needs to capture data related to file usage pattern... (1 Reply)
Discussion started by: raxitsheth
1 Replies

6. Shell Programming and Scripting

Reading a file that is already open by another process

hi, I'm using HP unix tru64 & Win XP. i'm download a file from winxp to unix using ftp. how to know whether a remote file is currently being used by the process or not? (my loaction unix server) (7 Replies)
Discussion started by: Tlg13team
7 Replies

7. Shell Programming and Scripting

Monitor open file handles used by a process

We have a process that is running out of file handles. Is there some command line way to determine this that we can include into a cron script? Please let me know JAK (3 Replies)
Discussion started by: jakSun8
3 Replies

8. UNIX for Advanced & Expert Users

Max No of Open File Descriptors in a process

I have set the maximum no of file descriptors open in a process to the value 8192 using the following lines set rlim_fd_max=8192 set rlim_fd_cur=8192 in the /etc/system file. I rebooted the machine and the command ulimit -n / -Hn both display the limits as 8192. However when I run my... (2 Replies)
Discussion started by: lakshmankumar12
2 Replies

9. UNIX for Dummies Questions & Answers

How to change File Description

When I am browsing the web and I end up in a directory with no HTML index file (ie index.html), I see something like this: Index of /k Name Last modified Size Description -------------------------------------------------------------------- 115-1564_CRW.jpg ... (4 Replies)
Discussion started by: PearPie
4 Replies
Login or Register to Ask a Question