10-20-2010
When a program fork()s, its file descriptors get inherited by the parent - not sure if this is the only way, but it's certainly a way.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Is there a way to monitor certain processes and if they hang too long to kill them, but certain scripts which are expected to take a long time to let them go?
Thank you
Richard (4 Replies)
Discussion started by: ukndoit
4 Replies
2. Solaris
Hi
Is there an easy way to identify and group currently running processes into OS processes and APP processes. Not all applications are installed as packages.
Any free tools or scripts to do this?
Many thanks. (2 Replies)
Discussion started by: wilsonee
2 Replies
3. UNIX for Advanced & Expert Users
Hi,
I was porting ipv4 application to ipv6; i was done with TCP transports. Now i am facing problem with SCTp transport at runtime.
To test SCTP transport I am using following server and client socket programs. Server program runs fine, but client program fails giving Invalid Arguments for... (0 Replies)
Discussion started by: chandrutiptur
0 Replies
4. Programming
Hi all,
On the server side, one socket is used for listening, the others are used for communicating with the client.
My question is: if i want to set option for socket, which socket should be set on?
If either can be set, what's the different?
Again, what's the different if set option... (1 Reply)
Discussion started by: blademan100
1 Replies
5. Programming
Why does this socket function only read the first 1440 chars of the stream. Why not the whole stream ? I checked it with gdm and valgrind and everything seems correct...
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include... (3 Replies)
Discussion started by: cyler
3 Replies
6. Programming
Dear Experts,
i am compiling my code in suse 4.1 which is compiling fine,
but at runtime it is showing me for socket programming error no 88
as i searched in errno.h it is telling me socket operation on non socket,
what is the meaning of this , how to deal with this error , please... (1 Reply)
Discussion started by: vin_pll
1 Replies
7. Linux
Hello every one i am implementing client server program.To handle multiple fds of client in server i used poll function.But this poll not able to access socket fd from other process.How can i share socket fd between two process.
Please Help me,Thanks in advance. (1 Reply)
Discussion started by: andrew.paul
1 Replies
8. IP Networking
I need clarification on whether it is okay to set socket options on a listening socket
simultaneously when it is being used in an accept() call?
Following is the scenario:-
-- Task 1 - is executing in a loop - polling a listen socket, lets call it 'fd', (whose file descriptor is global)... (2 Replies)
Discussion started by: jake24
2 Replies
9. Programming
Hello guys!
I had seen some posts at this forum talking about my problem, but maybe my scenario is a little different, and I want other solutions.
I saw users of this forums saying that the way to shared sockets is using UNIX Sockets, but this is the only way in my scenario?
My Scenario:... (4 Replies)
Discussion started by: serpens11
4 Replies
10. Shell Programming and Scripting
Input data:
read1_data1
read1_data1
read2_data1
read3_data1
read4_data1
read4_data1
read4_data1
read5_data1
.
.
Desired output result:
read1_data1
read1_data2
read2_data1
read3_data1
read4_data1 (3 Replies)
Discussion started by: perl_beginner
3 Replies
LEARN ABOUT CENTOS
curl_multi_wait
curl_multi_wait(3) libcurl Manual curl_multi_wait(3)
NAME
curl_multi_wait - polls on all easy handles in a multi handle
SYNOPSIS
#include <curl/curl.h>
CURLMcode curl_multi_wait(CURLM *multi_handle,
struct curl_waitfd extra_fds[],
unsigned int extra_nfds,
int timeout_ms,
int *numfds);
DESCRIPTION
This function polls on all file descriptors used by the curl easy handles contained in the given multi handle set. It will block until
activity is detected on at least one of the handles or timeout_ms has passed.
The calling application may pass additional curl_waitfd structures which are similar to poll(2)'s pollfd structure to be waited on in the
same call.
On completion, if numfds is supplied, it will be populated with the number of file descriptors on which interesting events occured.
If no extra file descriptors are provided and libcurl has no file descriptor to offer to wait for, this function will return immediately.
This function is encouraged to be used instead of select(3) when using the multi interface to allow applications to easier circumvent the
common problem with 1024 maximum file descriptors.
curl_waitfd
struct curl_waitfd {
curl_socket_t fd;
short events;
short revents;
};
CURL_WAIT_POLLIN
Bit flag to curl_waitfd.events indicating the socket should poll on read events such as new data received.
CURL_WAIT_POLLPRI
Bit flag to curl_waitfd.events indicating the socket should poll on high priority read events such as out of band data.
CURL_WAIT_POLLOUT
Bit flag to curl_waitfd.events indicating the socket should poll on write events such as the socket being clear to write without
blocking.
RETURN VALUE
CURLMcode type, general libcurl multi interface error code. See libcurl-errors(3)
AVAILABILITY
This function was added in libcurl 7.28.0.
SEE ALSO
curl_multi_fdset(3), curl_multi_perform(3)
libcurl 7.28.0 12 Jul 2012 curl_multi_wait(3)