Fossil SCM
Avoid deleting Unix socket files via atexit() from forked HTTP responses, as reported in [forum:11c9b27397|forum post 11c9b27397].
Commit
e0236194d861e23f0d776240d41409cd8544f59de384001da75a9104aa604fe0
Parent
dee17d9c1b1e270…
1 file changed
+1
+1
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -2667,10 +2667,11 @@ | ||
| 2667 | 2667 | nRequest++; |
| 2668 | 2668 | } |
| 2669 | 2669 | close(connection); |
| 2670 | 2670 | }else{ |
| 2671 | 2671 | int nErr = 0, fd; |
| 2672 | + g.zSockName = 0 /* avoid deleting the socket via atexit() */; | |
| 2672 | 2673 | close(0); |
| 2673 | 2674 | fd = dup(connection); |
| 2674 | 2675 | if( fd!=0 ) nErr++; |
| 2675 | 2676 | close(1); |
| 2676 | 2677 | fd = dup(connection); |
| 2677 | 2678 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -2667,10 +2667,11 @@ | |
| 2667 | nRequest++; |
| 2668 | } |
| 2669 | close(connection); |
| 2670 | }else{ |
| 2671 | int nErr = 0, fd; |
| 2672 | close(0); |
| 2673 | fd = dup(connection); |
| 2674 | if( fd!=0 ) nErr++; |
| 2675 | close(1); |
| 2676 | fd = dup(connection); |
| 2677 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -2667,10 +2667,11 @@ | |
| 2667 | nRequest++; |
| 2668 | } |
| 2669 | close(connection); |
| 2670 | }else{ |
| 2671 | int nErr = 0, fd; |
| 2672 | g.zSockName = 0 /* avoid deleting the socket via atexit() */; |
| 2673 | close(0); |
| 2674 | fd = dup(connection); |
| 2675 | if( fd!=0 ) nErr++; |
| 2676 | close(1); |
| 2677 | fd = dup(connection); |
| 2678 |