1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31: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:
fyodor
2007-08-11 05:36:05 +00:00
parent 208e8df6c4
commit e3cb62ffec

View File

@@ -167,7 +167,7 @@ void pfatal(const char *err, ...) {
log_write(o.log_errors? LOG_NORMAL|LOG_STDERR : LOG_STDERR, ": %s (%d)\n",
strerror(errno), errno);
#endif /* WIN32 perror() compatability switch */
if (o.log_errors) log_flush(LOG_STDOUT);
if (o.log_errors) log_flush(LOG_NORMAL);
fflush(stderr);
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",
strerror(errno), errno);
#endif /* WIN32 perror() compatability switch */
if (o.log_errors) log_flush(LOG_STDOUT);
if (o.log_errors) log_flush(LOG_NORMAL);
fflush(stderr);
return;
}