When write()ing to a raw device, what is known on return?

Sebastian Schmitz snoopy at ecrcvax.UUCP
Thu Nov 28 22:03:37 AEST 1985


Summary:
Expires:
References: <log-hb.325>
Sender:
Reply-To: snoopy at ecrcvax.UUCP (Sebastian Schmitz)
Followup-To:
Distribution:
Organization: European Computer-Industry Research Centre, Munchen, W. Germany
Keywords:


Actually when a write returns, one knows awfully little: here
is a little excerpt, one of my colleagues found in a book. Its
quite amusing, but correct, so I guess I'll put in in this bb.

Love,
Seb

Excerpt follows:

/***** ecrcvax:jokes / phoebe!micha /  8:25 am  Nov 19, 1985*/
I quote here a paragraph from the book "Advanced UN*X Programming" by
M.J.Rochkind that may reveal some of the characteristics of the system.
It describes what would the system tell you (if it could speak) when you
issue a 'write' system call (low level I/O, writes a buffer on the disc):

   I've taken note of your request, and rest assured that your file descriptor
is OK, I've copied your data successfully, and there's enough disc space.
Later, when it's convenient for me, and if I'm still alive, I'll try to put
your data on the disc where it belongs. If I discover an error, then I'll try
to print something on the console, but I won't tell you about it (indeed, you
may have terminated by then). If you, or any of the other process, tries to
read this data before I've written it out, I'll give it to you from the
buffer cache, so, if all goes well, you'll never be able to find
out when and if I've completed your request. You may ask no further
questions. Trust me. And thank me for the speed reply.

/* ---------- */
-- 
  Love,
  Sebastian (Snoopy)

"You haven't done it, till you've done it with pointers"

\!mcvax\!unido\!ecrcvax\!snoopy /* N.B. valid csh address */



More information about the Comp.unix.wizards mailing list