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.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
2. UNIX for Advanced & Expert Users
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
3. Shell Programming and Scripting
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
4. Shell Programming and Scripting
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
5. Solaris
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. Red Hat
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
7. Shell Programming and Scripting
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
8. SCO
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
9. Shell Programming and Scripting
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
LEARN ABOUT PHP
socketcall
SOCKETCALL(2) Linux Programmer's Manual SOCKETCALL(2)
NAME
socketcall - socket system calls
SYNOPSIS
#include <linux/net.h>
int socketcall(int call, unsigned long *args);
DESCRIPTION
socketcall() is a common kernel entry point for the socket system calls. call determines which socket function to invoke. args points to
a block containing the actual arguments, which are passed through to the appropriate call.
User programs should call the appropriate functions by their usual names. Only standard library implementors and kernel hackers need to
know about socketcall().
call Man page
SYS_SOCKET socket(2)
SYS_BIND bind(2)
SYS_CONNECT connect(2)
SYS_LISTEN listen(2)
SYS_ACCEPT accept(2)
SYS_GETSOCKNAME getsockname(2)
SYS_GETPEERNAME getpeername(2)
SYS_SOCKETPAIR socketpair(2)
SYS_SEND send(2)
SYS_RECV recv(2)
SYS_SENDTO sendto(2)
SYS_RECVFROM recvfrom(2)
SYS_SHUTDOWN shutdown(2)
SYS_SETSOCKOPT setsockopt(2)
SYS_GETSOCKOPT getsockopt(2)
SYS_SENDMSG sendmsg(2)
SYS_RECVMSG recvmsg(2)
SYS_ACCEPT4 accept4(2)
SYS_RECVMMSG recvmmsg(2)
SYS_SENDMMSG sendmmsg(2)
CONFORMING TO
This call is specific to Linux, and should not be used in programs intended to be portable.
NOTES
On a some architectures--for example, x86-64 and ARM--there is no socketcall() system call; instead socket(2), accept(2), bind(2), and so
on really are implemented as separate system calls.
On x86-32, socketcall() was historically the only entry point for the sockets API. However, starting in Linux 4.3, direct system calls are
provided on x86-32 for the sockets API. This facilitates the creation of seccomp(2) filters that filter sockets system calls (for new
user-space binaries that are compiled to use the new entry points) and also provides a (very) small performance improvement.
SEE ALSO
accept(2), bind(2), connect(2), getpeername(2), getsockname(2), getsockopt(2), listen(2), recv(2), recvfrom(2), recvmsg(2), send(2),
sendmsg(2), sendto(2), setsockopt(2), shutdown(2), socket(2), socketpair(2)
COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
Linux 2017-09-15 SOCKETCALL(2)