10-10-2008
Re:High Level Programming
Hi, this is jack Steven. I have an Interest to answers the questions on JAVA. If any one want to or interest in asking questions, you are welcome.
--------------------------------
Jack Steven
10 More Discussions You Might Find Interesting
1. Programming
Hi,
Could you please tell me how can I know which position a given read descriptor ocuppies in the descriptors table.
I know that, for instance, 'stdin' ocuppies position ... what about the others descriptors that I create usings pipes or sockets??
Thanks!
P.S.: Sorry for my bad English (2 Replies)
Discussion started by: jnuno
2 Replies
2. Programming
How can 'popen()' be used for reading and writing to opening pipe?
If i try 'popen("prog", "rw")'
and then put and get chars - it does
not work.
What is wrong? (1 Reply)
Discussion started by: szzz
1 Replies
3. Shell Programming and Scripting
I have tried to show the file name whose size is greater than 200 byte in current directory.
Please help me.
ls -l | tr -s " " " " | cut -f 5,9 -d " " >out.txt
#set -a x `cat out.txt`
i=0
`cat out.txt` | while
do
read x
echo $x
#re=200
j=0
if }" < "200" ]
then
echo $j
j=`expr $j... (2 Replies)
Discussion started by: rinku
2 Replies
4. UNIX Desktop Questions & Answers
OK... I'm fairly new to unix having the admin handed to me on a platter w/almost no training.
However, being a programmer, I do pick up things fairly easily, but this one is getting the best of me.
I have a unix server that runs multiple versions of the same ERP system, hand crafted for our... (1 Reply)
Discussion started by: chimodel
1 Replies
5. Shell Programming and Scripting
I need to find all the files that have group Read or Write permission or files that have user write permission.
This is what I have so far:
find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}'
It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies
6. IP Networking
Hi,
We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies
7. IP Networking
hi
am newbie to unix and socket programing
I am trying to figuring out syntax for read and write
to send data from server to client and client can read it
I have to send two integers
write(newsockfd,buffer,"%d %d",x,y,0) writing from client where x and y are two integers..
... (7 Replies)
Discussion started by: karthik1238
7 Replies
8. Shell Programming and Scripting
Hello Guys, How all are doing?
I have an issue in Unix and want help from all of you
I have a file in UNIX which it read by line by line , If at the end of line '0' is written the it should fetch that line into another file and change '0' to '1'
and If at the end of line '1' is written then it... (10 Replies)
Discussion started by: adisky123
10 Replies
9. Programming
Can someone help me to write this program in C in QNX?
Using the FIFO queues write a simple communication system consisting of programs write and read. The program write the parameters given strings enclosed in single quotes. These strings are written to the FIFO file. Reads the program read... (1 Reply)
Discussion started by: ebasse2
1 Replies
10. Shell Programming and Scripting
In the bash below the oldest folder in a directory is selected. If there are 3folders in the directory /home/cmccabe/Desktop/NGS/test and nothing is done to them (ie. no files deleted, renamed) then the bash correctly identifies f1 as the oldest. However, if something is done to the folder then... (4 Replies)
Discussion started by: cmccabe
4 Replies
LEARN ABOUT DEBIAN
pcap_get_selectable_fd
PCAP_GET_SELECTABLE_FD(3PCAP) PCAP_GET_SELECTABLE_FD(3PCAP)
NAME
pcap_get_selectable_fd - get a file descriptor on which a select() can be done for a live capture
SYNOPSIS
#include <pcap/pcap.h>
int pcap_get_selectable_fd(pcap_t *p);
DESCRIPTION
pcap_get_selectable_fd() returns, on UNIX, a file descriptor number for a file descriptor on which one can do a select() or poll() to wait
for it to be possible to read packets without blocking, if such a descriptor exists, or -1, if no such descriptor exists. Some network
devices opened with pcap_create() and pcap_activate(), or with pcap_open_live(), do not support select() or poll() (for example, regular
network devices on FreeBSD 4.3 and 4.4, and Endace DAG devices), so -1 is returned for those devices.
Note that in:
FreeBSD prior to FreeBSD 4.6;
NetBSD prior to NetBSD 3.0;
OpenBSD prior to OpenBSD 2.4;
Mac OS X prior to Mac OS X 10.7;
select() and poll() do not work correctly on BPF devices; pcap_get_selectable_fd() will return a file descriptor on most of those versions
(the exceptions being FreeBSD 4.3 and 4.4), but a simple select() or poll() will not indicate that the descriptor is readable until a full
buffer's worth of packets is received, even if the read timeout expires before then. To work around this, an application that uses
select() or poll() to wait for packets to arrive must put the pcap_t in non-blocking mode, and must arrange that the select() or poll()
have a timeout less than or equal to the read timeout, and must try to read packets after that timeout expires, regardless of whether
select() or poll() indicated that the file descriptor for the pcap_t is ready to be read or not. (That workaround will not work in FreeBSD
4.3 and later; however, in FreeBSD 4.6 and later, select() and poll() work correctly on BPF devices, so the workaround isn't necessary,
although it does no harm.)
Note also that poll() doesn't work on character special files, including BPF devices, in Mac OS X 10.4 and 10.5, so, while select() can be
used on the descriptor returned by pcap_get_selectable_fd(), poll() cannot be used on it those versions of Mac OS X. Kqueues also don't
work on that descriptor. poll(), but not kqueues, work on that descriptor in Mac OS X releases prior to 10.4; poll() and kqueues work on
that descriptor in Mac OS X 10.6 and later.
pcap_get_selectable_fd() is not available on Windows.
RETURN VALUE
A selectable file descriptor is returned if one exists; otherwise, -1 is returned.
SEE ALSO
pcap(3PCAP), select(2), poll(2)
5 April 2008 PCAP_GET_SELECTABLE_FD(3PCAP)