System Calls and I/O Parameter Reinitialization
- From: Aaron Hsu <arcfide@xxxxxxxxxxx>
- Date: Thu, 27 Mar 2008 00:09:37 -0500
Hello All,
Say that we take the set of system calls or built in procedures provided
by a UNIX, which could include libraries and the like in POSIX and
others. Then, say that we consider the subset of these calls that can or
could potentially be interruptable. Ones that come to mind immediately
are things like WAIT, functions that return EINTR, &c.
For this set of functions, I will have some that take input or output
parameters, such as pointers to structures or variables that are going
to either be read for input or used to store output values, such as a
pointer to an integer that stores the count of what was read or stored.
Say then, that a function like the above is interrupted. What kind of
Gurantee on a UNIX system do I have on the integrity of these I/O
Parameters? That is, is there any guarantee that I will not have to
reinitialize these parameters when I restart the call? I'm looking both
for the normal case as well as fringe cases like Cygwin or the like. For
example, if a call to a funtion that has a count pointer into which is
stored the amount of data transferred or something of the like, is
interrupted, can I be absolutely sure, from a conservative point of
view, that the count variable is reliable and does not need to be
reinitialized before restarting the call?
Thanks for your time!
--
Aaron Hsu <arcfide@xxxxxxxxxxx> | Jabber: arcfide@xxxxxxxxxx
``Government is the great fiction through which everybody endeavors to
live at the expense of everybody else.'' - Frederic Bastiat
.
- Follow-Ups:
- Re: System Calls and I/O Parameter Reinitialization
- From: Rainer Weikusat
- Re: System Calls and I/O Parameter Reinitialization
- From: Barry Margolin
- Re: System Calls and I/O Parameter Reinitialization
- Prev by Date: Re: execute a program during a system shutdown or reboot
- Next by Date: Re: System Calls and I/O Parameter Reinitialization
- Previous by thread: sed for sequential lines
- Next by thread: Re: System Calls and I/O Parameter Reinitialization
- Index(es):
Relevant Pages
|