Generally, a file descriptor is an index for an entry in a kernel-resident data structure containing the details of all open files. In POSIX this data structure is called a file descriptor table, and each process has its own file descriptor table. In Microsoft Windows terminology and in the context ...

learn more… | top users | synonyms (1)

0
votes
2answers
21 views

adding new sockets to epoll instances other than the epoll instance that polls the listening socket

The situation: Multiple processes share the same file descriptor table. Each process listens to its own epoll instance. All sockets and calls involving them are non-blocking. Among those processes, ...
3
votes
1answer
58 views

dup() followed by close() from multiple threads or processes

My program does the following in chronological order The program is started with root permissions. Among other tasks, A file only readable with root permissions is open()ed. Root privileges are ...
0
votes
3answers
54 views

Write at specific position at a file with open()

Hello I am trying to simulate two programs that send and receive files in C++ from the network, something like client and server. To begin with I have to split a file to pages of 4096 bytes and send ...
0
votes
1answer
24 views

Redirect a method call to something with a file descriptor - asyncore

We have a network client based on asyncore with the user's network connection is embodied in a Dispatcher. The goal is for a user working from an interactive terminal to be able to enter network ...
-1
votes
0answers
28 views

Redirect a method call to something with a file descriptor - python,asynore

I have a piece of production code in which I have found a very interesting bug that I want to fix. I'll put the code at the bottom since this is a long post. We have a network client based on ...
0
votes
1answer
20 views

capturing EOF sent from netcat

I am implementing a multi threaded chat server just to learn. I am connecting clients through netcat. I need to broadcast the message received by a client to other connected clients. That part is ...
0
votes
2answers
72 views

C program, strange behaviour

Recently I came across the problem of geting 'Oops, Spwan error, can not allocate memory' while working with one C Application. To understand the File Descriptor and Memory management better I give a ...
0
votes
3answers
58 views

closing a file descriptor and then using it

Below is a code segment which explains dup2 system call. What I don't understand is, after duplicating both file descriptors why do we need to close the old file descriptor. Since "out" descriptor is ...
0
votes
0answers
34 views

Automatically Remove/delete File descriptor

Recently I come acorss a strange problem. A Program running as a daemon and creates File descriptor and it constantly increase. I can count from the /proc/{pid}/fd/. File descriptor constantly ...
0
votes
2answers
26 views

Socket programming and arrays

Hello i am trying to create 2 programms that communicate throught TCP sockets, on C++. I know how to use write() and read() functions but I encounter a problem when I try to send array from one ...
0
votes
0answers
31 views

OSB - BEA-000409 - Cannot get fd for sock=Socket[addr=our.proxy.server/xx.xxx.xxx.xxx,port=8080,localport=59719]]

we have a problem in our development environment. We are on WLS 10.3 , windows server 2008 R2 enterprise, jdk1.6.0_45 64bit. We use OSB paltform and we try to invoke an external web service which is ...
0
votes
1answer
95 views

Select in C, why does it fail?

I'm reviewing a code in C with select(2) function. In this code, select function should return a number different from 0 when any of a set of two sockets it's ready. However it fails to find any file ...
0
votes
1answer
30 views

FD_ISSET returns 0 after FD_SET

I have the following code: FD_SET(mc_sock, &readfds); foo = FD_ISSET(mc_sock, &readfds); // returns 1 // Wait until some socket on the set is ready to be read while(select ...
-1
votes
0answers
20 views

How to find speed of wlan interface? [closed]

I'm trying to find speed of network interface using file-descriptor. I't easy to do it for ethX, just calling cat /sys/class/net/eth0/speed. Unfortunately this method doesn't work with wireless ...
0
votes
1answer
27 views

Closing stdin stdout and stderr the ptunnel way

I was intrigued by the way ptunnel closes stdin, stdout and stderr: if (daemonize) { ... freopen("/dev/null", "r", stdin); freopen("/dev/null", "w", stdout); freopen("/dev/null", "w", ...

1 2 3 4 5 24
15 30 50 per page