Mercurial > hg > nginx-quic
view src/os/win32/ngx_dlopen.c @ 9039:8880fe0b193c
Win32: reworked ngx_win32_rename_file() to check errors.
Previously, ngx_win32_rename_file() retried on all errors returned by
MoveFile() to a temporary name. It only make sense, however, to retry
when the destination file already exists, similarly to the condition
when ngx_win32_rename_file() is called. Retrying on other errors is
meaningless and might result in an infinite loop.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 23 Feb 2023 20:49:50 +0300 |
parents | 7142b04337d6 |
children |
line wrap: on
line source
/* * Copyright (C) Maxim Dounin * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> #include <ngx_core.h> char * ngx_dlerror(void) { u_char *p; static u_char errstr[NGX_MAX_ERROR_STR]; p = ngx_strerror(ngx_errno, errstr, NGX_MAX_ERROR_STR); *p = '\0'; return (char *) errstr; }