select function


 
Thread Tools Search this Thread
Top Forums Programming select function
# 1  
Old 06-10-2008
Question select function

Dear all,
I am using select function for the socket programming. What is the purpose of except fd's fd set in the argument.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Function - Make your function return an exit status

Hi All, Good Day, seeking for your assistance on how to not perform my 2nd, 3rd,4th etc.. function if my 1st function is in else condition. #Body function1() { if then echo "exist" else echo "not exist" } #if not exist in function1 my all other function will not proceed.... (4 Replies)
Discussion started by: meister29
4 Replies

2. Shell Programming and Scripting

Need help on awk for printing the function name inside each function

Hi, I am having script which contains many functions. Need to print each function name at the starting of the function. Like below, functionname() { echo "functionname" commands.... } I've tried like below, func=`grep "()" scriptname | cut -d "(" -f1` for i in $func do nawk -v... (4 Replies)
Discussion started by: Sumanthsv
4 Replies

3. Shell Programming and Scripting

Will files, creaetd in one function of the same script will be recognized in another function?

Dear All. I have a script, which process files one by one. In the script I have two functions. one sftp files to different server the other from existing file create file with different name. My question is: Will sftp function recognize files names , which are created in another... (1 Reply)
Discussion started by: digioleg54
1 Replies

4. Shell Programming and Scripting

Help to Modify File Name in each function before calling another function.

I have a script which does gunzip, zip and untar. Input to the script is file name and file directory (where file is located) I am reading the input parameters as follows: FILENAME=$1 FILEDIR=$2 I have created 3 functions that are as follows: 1) gunzip file 2) unzip file... (2 Replies)
Discussion started by: pinnacle
2 Replies

5. Boot Loaders

Reboot and Select Proper Boot device or insert Boot media in select Boot device and press a key

Hello, I have kubuntu on my laptop and now I decided to switch to Windows 7. I made the bios settings properly (first choice is boot from cd\vd) but I see the error " reboot and select proper Boot device or insert Boot media in select Boot device and press a key " I have tried CD and... (0 Replies)
Discussion started by: rpf
0 Replies

6. Shell Programming and Scripting

Return a value from called function to the calling function

I have two scripts. script1.sh looks -------------------------------- #!/bin/bash display() { echo "Welcome to Unix" } display ----------------------------- Script2.sh #!/bin/bash sh script1.sh //simply calling script1.sh ------------------------------ (1 Reply)
Discussion started by: mvictorvijayan
1 Replies

7. Shell Programming and Scripting

Passing global variable to a function which is called by another function

Hi , I have three funcions f1, f2 and f3 . f1 calls f2 and f2 calls f3 . I have a global variable "period" which i want to pass to f3 . Can i pass the variable directly in the definition of f3 ? Pls help . sars (4 Replies)
Discussion started by: sars
4 Replies

8. Programming

Anyone know how to use socket select() function?

hello socket programming expert, I having difficulties in understanding how select() function in socket programming work.... I'm trying to create my own peer-to-peer chat or file transfer program by using the select() function.... Therefore does anyone had any tutorial or source code that... (4 Replies)
Discussion started by: draggy
4 Replies

9. Shell Programming and Scripting

"select" function sequence

Hi folks, As we all know, the "select" function give a number to each element as the number of elements in the select. for example: I have a program which ask a user to select a language: =============================================================================== Please select the... (1 Reply)
Discussion started by: nir_s
1 Replies

10. Programming

How to convert the "select" function into a "poll" function

i have a program using the select function but i want to convert it to poll... how can i do this? thanks in advance... :) (1 Reply)
Discussion started by: rbolante
1 Replies
Login or Register to Ask a Question
Select(3pm)						User Contributed Perl Documentation					       Select(3pm)

NAME
Coro::Select - a (slow but coro-aware) replacement for CORE::select SYNOPSIS
use Coro::Select; # replace select globally (be careful, see below) use Core::Select 'select'; # only in this module use Coro::Select (); # use Coro::Select::select DESCRIPTION
This module tries to create a fully working replacement for perl's "select" built-in, using "AnyEvent" watchers to do the job, so other threads can run in parallel to any select user. As many libraries that only have a blocking API do not use global variables and often use select (or IO::Select), this effectively makes most such libraries "somewhat" non-blocking w.r.t. other threads. This implementation works fastest when only very few bits are set in the fd set(s). To be effective globally, this module must be "use"'d before any other module that uses "select", so it should generally be the first module "use"'d in the main program. Note that overriding "select" globally might actually cause problems, as some "AnyEvent" backends use "select" themselves, and asking AnyEvent to use Coro::Select, which in turn asks AnyEvent will not quite work. You can also invoke it from the commandline as "perl -MCoro::Select". To override select only for a single module (e.g. "Net::DBus::Reactor"), use a code fragment like this to load it: { package Net::DBus::Reactor; use Coro::Select qw(select); use Net::DBus::Reactor; } Some modules (notably POE::Loop::Select) directly call "CORE::select". For these modules, we need to patch the opcode table by sandwiching it between calls to "Coro::Select::patch_pp_sselect" and "Coro::Select::unpatch_pp_sselect": BEGIN { use Coro::Select (); Coro::Select::patch_pp_sselect; require evil_poe_module_using_CORE::SELECT; Coro::Select::unpatch_pp_sselect; } BUGS
For performance reasons, Coro::Select's select function might not properly detect bad file descriptors (but relying on EBADF is inherently non-portable). SEE ALSO
Coro::LWP. AUTHOR
Marc Lehmann <schmorp@schmorp.de> http://home.schmorp.de/ perl v5.14.2 2012-04-13 Select(3pm)