mirror of
https://github.com/nginx/nginx.git
synced 2026-08-31 17:10:58 +00:00
unlink unix domain socket file after testing
This commit is contained in:
parent
44fa8877c0
commit
633c178a17
1 changed files with 12 additions and 0 deletions
|
|
@ -365,6 +365,18 @@ ngx_open_listening_sockets(ngx_cycle_t *cycle)
|
|||
continue;
|
||||
}
|
||||
|
||||
#if (NGX_HAVE_UNIX_DOMAIN)
|
||||
|
||||
if (ngx_test_config && ls[i].sockaddr->sa_family == AF_UNIX) {
|
||||
u_char *name = ls[i].addr_text.data + sizeof("unix:") - 1;
|
||||
|
||||
if (ngx_delete_file(name) == -1) {
|
||||
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_socket_errno,
|
||||
ngx_delete_file_n " %s failed", name);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (listen(s, ls[i].backlog) == -1) {
|
||||
ngx_log_error(NGX_LOG_EMERG, log, ngx_socket_errno,
|
||||
"listen() to %V, backlog %d failed",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue