12-12-2005
That's all about inter-process communication ... well i think!
What if the main server listen on another socket serving the updated descriptor table, you then signal all child that a new refreshed table is available on socket x whenever a new child is joining the party ...
10 More Discussions You Might Find Interesting
1. Programming
Hi,
I have written a daemon process, to perform certain operations in the background.
For this I have to close, the open file descriptors,
Does anybody know how to find out the number of open file descriptors ?
Thanks in Advance,
Sheetal (2 Replies)
Discussion started by: s_chordia
2 Replies
2. UNIX for Advanced & Expert Users
Hello all,
A few questions on file descriptors ...
scenario : Sun Ultra 30 with Sun OS 5.5.1 , E250 with Solaris 2.6
In one of my servers, the file descriptor status from the soft limit and hard limits are 64 and 1024 respectively for root user.
Is the soft limit (64) represents the... (3 Replies)
Discussion started by: shibz
3 Replies
3. UNIX for Dummies Questions & Answers
i m trying to learn processes in unix and i've been reading this but i don't quite get it. its regarding file descriptors. : each is a part of file pointers, they point to another area. indexes into an Operating system maintained table called "file descriptor table". one table per process. may... (3 Replies)
Discussion started by: a25khan
3 Replies
4. Shell Programming and Scripting
Greetings,
I have a troubling problem with a Korn Shell concept that I know works in Solaris.
Essentially I am assigning file descriptors to a coprocess. Also, it should be noted that I am not using the public domain ksh but, rather AT&T ksh93.
Here is a test scenario:
$ sqlplus -s... (5 Replies)
Discussion started by: tmarikle
5 Replies
5. Shell Programming and Scripting
I have a script that creates a KSH co-process for Oracle sqlplus and I am presently interacting with it via print -p and read -p.
I also need to interact with another Oracle database what isn't permitted to have any direct connection to the first. Presently, I simply disconnect from the first... (10 Replies)
Discussion started by: tmarikle
10 Replies
6. UNIX for Advanced & Expert Users
Hi All,
This thread is going to be a discussion basically bringing out more information from the experts on cron jobs and the associated file handles.
So, here is the question.
There is definitely a constant ' n ' as the maximum number of file handles alloted to a process ' p '.
Will... (7 Replies)
Discussion started by: matrixmadhan
7 Replies
7. UNIX for Dummies Questions & Answers
I have written this code, and according to my research it SHOULD be going down the list until it is finished, but I am getting blank feedback. Nothing is being output as far as I can tell.
#!/bin/sh
while echo Enter to start traversing
read enter
do
read list <&3
echo $list
done
any... (2 Replies)
Discussion started by: MaestroRage
2 Replies
8. HP-UX
Hi,
I speak and write english more or less, so I hope my asking be clear.
:)
In the company I am working, they are using control-m software to lunch
shell scripts.
So i put this command in all shell scripts:
export LOGFILE_tmp=$PRODUC_DATA/tmp/${SCRIPT}_${PAIS}_`date... (0 Replies)
Discussion started by: anamcara
0 Replies
9. UNIX for Dummies Questions & Answers
What is the difference between a file descriptor and a semaphore?
My basic understanding is:
- a file descriptor is a small positive integer that the system uses instead of the file name to identify an open file or socket.
- a semaphore is a variable with a value that indicates the... (1 Reply)
Discussion started by: Mr_Webster
1 Replies
10. Shell Programming and Scripting
Hi, I'm playing with KSH
I entered following command in terminal
{ echo "stdout" >&1; echo "stderr" >&2; } > out
And I get only stoud in a new file out.
My question is: Where did my stderr vanish ? (5 Replies)
Discussion started by: solaris_user
5 Replies
socket(2) System Calls Manual socket(2)
NAME
socket - Creates an end point for communication and returns a descriptor
SYNOPSIS
#include <sys/socket.h>
int socket ( int domain, int type, int protocol );
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
socket(): XNS5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
PARAMETERS
Specifies the communications domain in which a socket is to be created. The domain argument specifies the address family with which
addresses specified in later socket operations should be interpreted. The sys/socket.h file contains the definitions of the address fami-
lies. Commonly used families are: UNIX pathnames Internet addresses (IPv4) [Tru64 UNIX] Internet addresses (IPv6) Specifies the seman-
tics of communication. The sys/socket.h file defines the socket types. The following types are supported: Provides sequenced, reliable,
two-way byte streams with a transmission mechanism for out-of-band data. Provides datagrams, which are connectionless messages of a fixed
maximum length. [Tru64 UNIX] Provides access to internal network protocols and interfaces. This type of socket is available only to a
process with superuser privilege. Specifies a particular protocol to be used with the socket. Specifying a protocol of 0 (zero) causes
the socket() function to default to the typical protocol for the requested type of returned socket.
DESCRIPTION
The socket() function creates a socket of the specified type in the specified domain.
The socket() function returns a descriptor (an integer) that can be used in later system calls that operate on sockets.
Socket level options control socket operations. The getsockopt() and setsockopt() functions are used to get and set these options, which
are defined in the sys/socket.h file.
RETURN VALUES
Upon successful completion, the socket() function returns a nonnegative integer (the socket descriptor). Otherwise, a value of -1 is
returned and errno is set to indicate the error.
ERRORS
If the socket() function fails, errno may be set to one of the following values: The process have not have appropriate privileges. The
addresses in the specified address family are not available in the kernel. The per-process descriptor table is full. No more file
descriptors are available for the system. Insufficient resources were available in the system to complete the call. The system was unable
to allocate kernel memory to increase the process descriptor table. The available STREAMS resources were insufficient for the operation to
complete. [Tru64 UNIX] The process is attempting to open a raw socket and does not have superuser privilege. The socket in the specified
address family is not supported. The socket type is not supported by the protocol.
RELATED INFORMATION
Functions: accept(2), bind(2), connect(2), listen(2), getsockname(2), getsockopt(2), recv(2), recvfrom(2), recvmsg(2), send(2), sendto(2),
sendmsg(2), setsockopt(2), shutdown(2), socketpair(2)
Standards: standards(5) delim off
socket(2)