Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

io_wait(3) [debian man page]

io_wait(3)						     Library Functions Manual							io_wait(3)

NAME
io_wait - wait for events SYNTAX
#include <io.h> void io_wait(); DESCRIPTION
io_wait() checks the descriptors that the program is interested in to see whether any of them are ready. If none of them are ready, io_wait() tries to pause until one of them is ready, so that it does not take time away from other programs running on the same computer. io_wait pays attention to timeouts: if a descriptor reaches its timeout, and the program is interested in reading or writing that descrip- tor, io_wait will return promptly. Under some circumstances, io_wait will return even though no interesting descriptors are ready. Do not assume that a descriptor is ready merely because io_wait has returned. io_wait is not interrupted by the delivery of a signal. Programs that expect interruption are unreliable: they will block if the same sig- nal is delivered a moment before io_wait. The correct way to handle signals is with the self-pipe trick. SEE ALSO
io_waituntil(3), io_check(3), io_wantread(3), io_wantwrite(3), io_fd(3) io_wait(3)

Check Out this Related Man Page

io_canwrite(3)						     Library Functions Manual						    io_canwrite(3)

NAME
io_canwrite - return a file descriptor that can be written to SYNTAX
#include <io.h> int64 io_canwrite(); DESCRIPTION
io_canwrite returns the next file descriptor that can be written to. You have to have used io_wantwrite() on the file descriptor earlier, and you have to have called io_wait() or io_waituntil(). These functions then keep an internal data structure on which descriptors were reported writable by the operating system. Please note that there is no guarantee that you can still write data without blocking to that descriptor, just that you could when io_wait() or io_waituntil() were called. Another process could have written something before you. Look at the result from io_trywrite(). If there are no more descriptors that you can write to without blocking, io_canwrite will return -1. In this case you should call io_wait() or io_waituntil() again. You should only use io_trywrite(3), io_sendfile(3) or iob_send(3) to write to the file, not plain write(2). If you use write(2) and get EAGAIN, call io_eagain(3). SEE ALSO
io_wait(3), io_canwrite(3) io_canwrite(3)
Man Page

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

taking backup en getting info about it

I want to write a script that tells me if the tape device is ready, if the answer is not yes ($?is not 0) i get an answer that the tape_device is not ready. If the tape is ready i can do a tar -cvf $tape1 * . How can i write a script to control if the tapedevice is ready or not? How can i... (1 Reply)
Discussion started by: eddyvdv
1 Replies

2. UNIX for Dummies Questions & Answers

looping question

I am writing a simple script and want to keep the user in a fuction until they are ready to get out. For some (probably stupid) reason, it doesn't seem to be working. You guys see anything that I'm overlooking? crsd() {until do /home/wcs3611.crsdtmp.sh echo 'run another? \c' ... (1 Reply)
Discussion started by: hedrict
1 Replies

3. UNIX for Dummies Questions & Answers

New User

I am very interested in learning all I can about all of the computer languages so any help that anyone could give me would really be appreciated. (2 Replies)
Discussion started by: bobbie38
2 Replies

4. Programming

Selectable Id

If we want to determine that amongst many descriptors which one is set ready for reading , ready for writing or has an error condition pending we use the select () utility.I would like to know can we have some technique by which we will be able to determine which amongst many IPC ids is ready for... (0 Replies)
Discussion started by: S.P.Prasad
0 Replies

5. Solaris

Advice - Solaris 9 Exam 310-014 & 310-015

I think I am ready for the 310-014 exam but not quite ready for the 310-015 exam as I still have a lot of study and practice to do to prepare for it.. Do most people sit the 014 exam and then prepare for the second exam? Any advice on how to tackle these is appreciated.. (3 Replies)
Discussion started by: frustrated1
3 Replies

6. Shell Programming and Scripting

Want to execute rest of the script after the file is ready ...

Hi All I have a requirement like, where a file gets generated in a particular dir and once the file is ready and available then I want to execute rest of the script, because untill and unless the file exists and is available there is no use of running rest of the commands in that script. ... (5 Replies)
Discussion started by: csaha
5 Replies

7. Virtualization and Cloud Computing

VirtualBox 3.1 ready for download

Downloads - VirtualBox (0 Replies)
Discussion started by: DukeNuke2
0 Replies