mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 14:11:29 +00:00
merge soc07 r5116 - Flush LOG_NORMAL in gh_perror() and pfatal() instead of LOG_STDOUT when --log-errors is used
This commit is contained in:
@@ -167,7 +167,7 @@ void pfatal(const char *err, ...) {
|
|||||||
log_write(o.log_errors? LOG_NORMAL|LOG_STDERR : LOG_STDERR, ": %s (%d)\n",
|
log_write(o.log_errors? LOG_NORMAL|LOG_STDERR : LOG_STDERR, ": %s (%d)\n",
|
||||||
strerror(errno), errno);
|
strerror(errno), errno);
|
||||||
#endif /* WIN32 perror() compatability switch */
|
#endif /* WIN32 perror() compatability switch */
|
||||||
if (o.log_errors) log_flush(LOG_STDOUT);
|
if (o.log_errors) log_flush(LOG_NORMAL);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -204,7 +204,7 @@ void gh_perror(const char *err, ...) {
|
|||||||
log_write(o.log_errors? LOG_NORMAL|LOG_STDERR : LOG_STDERR, ": %s (%d)\n",
|
log_write(o.log_errors? LOG_NORMAL|LOG_STDERR : LOG_STDERR, ": %s (%d)\n",
|
||||||
strerror(errno), errno);
|
strerror(errno), errno);
|
||||||
#endif /* WIN32 perror() compatability switch */
|
#endif /* WIN32 perror() compatability switch */
|
||||||
if (o.log_errors) log_flush(LOG_STDOUT);
|
if (o.log_errors) log_flush(LOG_NORMAL);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user