Re: Send a Control+D from the Run Log Window
Re: Send a Control+D from the Run Log Window
- Subject: Re: Send a Control+D from the Run Log Window
- From: "Justin C. Walker" <email@hidden>
- Date: Sat, 12 May 2007 11:43:08 -0700
On May 12, 2007, at 11:11 , Francis Derive wrote:
Justin,
Il you think someone would file a bug @ apple because I said
the "CTRL-D" turns written as "EOF"
I want to apologize because ti is the client code itself which does
this just to mention the EOF.
The printing of "EOF" is not a bug (as you observe).
Now, if it were because nothing happens when I try to send the
necessary CTRL+D to end the client message when I do this either in
Standard I/O window or GDB window, may be it could be relevant to
file this "bug".
This may be a bug. To be clear (since I can't tell from your comment
whether you know this), CTRL-D is usually *not* sent across the
network, or passed to a program, when the user types it. As the code
in simpleclient shows, if the read request returns with fewer bytes
than expected, the program checks for the "end-of-file" condition.
If the program is reading from a "real file", the operating system
*knows* that the end has been reached, and sets an indictor showing
this fact. Since the program is reading from a terminal, there is no
such condition. Instead, the user types CTRL-D to tell the operating
system that he (the user) is "ending" this particular stream. The OS
sets the EOF condition, so when the *program* checks ("if (feof
()..."), it sees an EOF.
The problem *may* be that Xcode's debugger implementation is not
honoring this (perhaps because of technical problems; perhaps because
of oversight). A bug report does seem warranted. Apple will happily
close this if we've misunderstood (or if they like the way it works).
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Director
Institute for the Enhancement of the Director's Income
--------
"Weaseling out of things is what separates us from the animals.
Well, except the weasel."
- Homer J Simpson
--------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden