LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 09-09-2009, 02:21 AM   #1
kattythebest
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
alexroux
LQ Newbie
 
Registered: Sep 2009
Location: Lausanne (Switzerland)
Distribution: Ubuntu
Posts: 12

Rep: Reputation: 3
Wink

From man page:

Quote:
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.
 
  


Reply

Tags
poll


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


All times are GMT -5. The time now is 07:32 PM.

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