Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-09-2009, 02:21 AM   #1
LQ Newbie
Registered: Sep 2009
Posts: 1

Rep: Reputation: 0
Lightbulb variable 'timeout' on function poll()

Hi folks,

Can anybody tell me output/return value of function poll() when the variable 'timeout' is negative

int poll(struct pollfd *fds, nfds_t nfds, int timeout);
Old 09-09-2009, 03:10 AM   #2
LQ Newbie
Registered: Sep 2009
Location: Lausanne (Switzerland)
Distribution: Ubuntu
Posts: 12

Rep: Reputation: 3

From man page:

The timeout argument specifies an upper limit on the time for which poll() will block, in milliseconds. Specifying a
negative value in timeout means an infinite timeout.
In a general way, the behavior of each POSIX or GNU/Linux primitive is detailed in the man pages. Always take a look at them before looking further on the web.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Timeout function using Python vishnu_sreekumar Programming 1 08-03-2009 04:52 AM
function showing a list of variable and value: (dynamic variable name) budhax Linux - Newbie 1 09-19-2008 07:05 PM
perl: can I make the system function timeout? apeekaboo Programming 7 07-24-2007 07:52 AM
function poll() trouble harvest Programming 1 10-08-2006 03:42 PM
select function as timeout? frostmagic Programming 2 02-09-2004 11:56 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:15 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration