BIND 10 #2369: InputSource helper class for MasterLexer

BIND 10 Development do-not-reply at isc.org
Wed Nov 7 07:28:27 UTC 2012


#2369: InputSource helper class for MasterLexer
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  muks
  jinmei                             |                Status:  reviewing
                       Type:  task   |             Milestone:
                   Priority:         |  Sprint-20121120
  medium                             |            Resolution:
                  Component:         |             Sensitive:  0
  libdns++                           |           Sub-Project:  DNS
                   Keywords:         |  Estimated Difficulty:  4
            Defect Severity:  N/A    |           Total Hours:  3.72
Feature Depending on Ticket:         |
  loadzone-ng                        |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------

Comment (by muks):

 Replying to [comment:27 vorner]:
 > > * What to do with prefix and suffix increment/decrement operators
 (what style to use from [[CodingGuidelines]])?
 >
 > Well, I'm not sure about the guidelines (I don't read them much). But in
 C++,
 > when we use iterators, the prefix version (`++i`) is generally faster,
 because
 > it doesn't need to create a copy. So the prefix one is usually preferred
 for
 > consistency even for primitive types like integeres.

 This code has been updated to use the prefix style.

 > > * How to test a `ReadError` exception (for this I don't have a
 surefire way yet).
 >
 > I was thinking something like this: If we have a TCP network connection,
 and
 > the other side resets the connection (not closes, but crashes or
 something),
 > the other side should get a read error on it. Something like this could
 work
 > for unix-domain socket or for a pipe. The later is exchangeable for a
 file.
 >
 > But it looks overcomplicated for such a small test, so we may probably
 just
 > leave it as it is.

 I tried it by making a `pipe()`, forking off a child and in the parent,
 wrapping a
 `boost::iostreams::stream<boost::iostreams::file_descriptor_source>`
 around it. When the child is killed (even with SIGKILL), the socket
 returns EOF. I am skipping this.

-- 
Ticket URL: <https://bind10.isc.org/ticket/2369#comment:29>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list