On Feb 6, 2006, at 7:45 PM, Palmer, Mike wrote:

Actually I believe that all reads from a null device immediately receive
a terminating character (CR). All writes also complete successfully
without problems. That's the purpose of the null device.

The thing that often causes looping code is a call to a fileman utility with bad data (i.e. doesn't match input transform) and the error message
is displayed to and then read from the null device and gets a <CR>.
You'll often see evidence of it in the fileman variables.

Under Unix, at least, the null device is supposed to look like it's perpetually at EOF when you try to read from it. Now, at the MUMPS level, the behavior is evidently different.

Here's another simple test

~:$ cat test.c
#include <stdio.h>
#include <fcntl.h>

int main()
{
  int fd;
  char buf[256];
  int chars;
  fd = open("/dev/null", O_RDONLY);
  chars = read(fd, *buf, 255);
  printf("There were %d characters read.\n", chars);
}
~:$ cc test.c
~:$ a.out
There were 0 characters read.
~:$



===
Gregory Woodhouse
[EMAIL PROTECTED]

"It is foolish to answer a question that
you do not understand."
--G. Polya ("How to Solve It")





-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Hardhats-members mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to