Re: syscall reference



On 22 Apr 2008 17:42:31 -0600 Joe Pfeiffer <pfeiffer@xxxxxxxxxxx> wrote:

| "Bill Cunningham" <nospam@xxxxxxxxx> writes:
|
|> Does anyone know of a good online syscall reference and tutorial for
|> linux's syscalls. I was going to open a pipe and can't find any references
|> for the needed sys calls like write read and close.
|
| Chapter 2 of the man pages is the reference for the C language
| interface to the system. I'm a bit puzzled that a day or so ago you
| were asking for help with a nearly-correct program that created and
| used a pipe, and now you're asking about references to write(),
| read(), and close() -- calls that your program was using correctly.

It could be that he is wanting to know the exact semantics of how these
functions behave with pipes (as opposed to the more common access to a
file). For example, if a write() is done with less than PIPE_BUF bytes
of data, but with more data than is available free in the pipe, will it
do a partial write and return the length unwritten, splitting the data,
or will it not write at all, returning 0, to avoid splitting the data.
He may then get curious how things like select() and poll() work in these
cases, where the condition if space available in the buffer has to be
decided without knowledge of how much is to be written as a whole.
Neither man page for write or pipe in chapter 2 covers this. He appears
to need the man page for pipe in chapter 7. Maybe you can suggest it.

--
|WARNING: Due to extreme spam, I no longer see any articles originating from |
| Google Groups. If you want your postings to be seen by more readers |
| you will need to find a different place to post on Usenet. |
| Phil Howard KA9WGN (email for humans: first name in lower case at ipal.net) |
.



Relevant Pages

  • Re: Make pipe data structure be a circular list of pages, rather
    ... > (again, incrementing their reference count, not copying the data) from ... > one pipe to two other pipes. ... > This is the main reason why I want to avoid coalescing if possible: ...
    (Linux-Kernel)
  • Re: How do you get your stems back on straight?
    ... JtN ©2006 ... get it exactly where you want it then you will always have a reference ... properly center and level the pipe while your smoking it as well. ... When you remove the stem from your pipe, how do you get it back on ...
    (alt.smokers.pipes)
  • Re: How do you get your stems back on straight?
    ... get it exactly where you want it then you will always have a reference ... properly center and level the pipe while your smoking it as well. ... When you remove the stem from your pipe, how do you get it back on ...
    (alt.smokers.pipes)
  • Re: Problem with status value returned by waitpid
    ... > system you aren't interested in the exit status of your child processes. ... readhangs after successfully reading data echo'ed ... > write side of the pipe is still open in the parent. ... > reference count on the write side of the pipe is two. ...
    (comp.unix.programmer)