Ticket #1882 (closed RFC: fixed)
gethostbyname failure doesn't throw an exception
| Reported by: | dukeleto | Owned by: | whiteknight |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.11 |
| Component: | docs | Version: | 2.10.0 |
| Severity: | medium | Keywords: | |
| Cc: | Language: | ||
| Patch status: | Platform: | unix |
Description
Currently in src/io/socket_unix.c there is the following code:
/* Maybe it is a hostname, try to lookup */
/* XXX Check PIO option before doing a name lookup,
* it may have been toggled off.
*/
struct hostent *he = gethostbyname(host);
/* XXX FIXME - Handle error condition better */
if (!he) {
fprintf(stderr, "gethostbyname failure [%s]\n", host);
return;
}
What kind of exception should be thrown here?
Change History
Note: See
TracTickets for help on using
tickets.
