Fossil SCM

Add the --unix-socket option to the "fossil server" command.

drh 2024-08-05 20:23 trunk
Commit 7fc2902126d43f87f897a46d12209f5b04d71d2cb50acd08ffad94c9b0c6aba6
2 files changed +52 -20 +16 -1
+52 -20
--- src/cgi.c
+++ src/cgi.c
@@ -70,16 +70,18 @@
7070
# endif
7171
# include <winsock2.h>
7272
# include <ws2tcpip.h>
7373
#else
7474
# include <sys/socket.h>
75
+# include <sys/un.h>
7576
# include <netinet/in.h>
7677
# include <arpa/inet.h>
7778
# include <sys/times.h>
7879
# include <sys/time.h>
7980
# include <sys/wait.h>
8081
# include <sys/select.h>
82
+# include <errno.h>
8183
#endif
8284
#ifdef __EMX__
8385
typedef int socklen_t;
8486
#endif
8587
#include <time.h>
@@ -2475,10 +2477,11 @@
24752477
#define HTTP_SERVER_SCGI 0x0002 /* SCGI instead of HTTP */
24762478
#define HTTP_SERVER_HAD_REPOSITORY 0x0004 /* Was the repository open? */
24772479
#define HTTP_SERVER_HAD_CHECKOUT 0x0008 /* Was a checkout open? */
24782480
#define HTTP_SERVER_REPOLIST 0x0010 /* Allow repo listing */
24792481
#define HTTP_SERVER_NOFORK 0x0020 /* Do not call fork() */
2482
+#define HTTP_SERVER_UNIXDOMAINSOCK 0x0040 /* Use a unix-domain socket */
24802483
24812484
#endif /* INTERFACE */
24822485
24832486
/*
24842487
** Maximum number of child processes that we can have running
@@ -2515,58 +2518,87 @@
25152518
socklen_t lenaddr; /* Length of the inaddr structure */
25162519
int child; /* PID of the child process */
25172520
int nchildren = 0; /* Number of child processes */
25182521
struct timeval delay; /* How long to wait inside select() */
25192522
struct sockaddr_in inaddr; /* The socket address */
2523
+ struct sockaddr_un uxaddr; /* The address for unix-domain sockets */
25202524
int opt = 1; /* setsockopt flag */
2521
- int iPort = mnPort;
2525
+ int rc; /* Result code from system calls */
2526
+ int iPort = mnPort; /* Port to try to use */
25222527
25232528
while( iPort<=mxPort ){
2524
- memset(&inaddr, 0, sizeof(inaddr));
2525
- inaddr.sin_family = AF_INET;
2526
- if( zIpAddr ){
2527
- inaddr.sin_addr.s_addr = inet_addr(zIpAddr);
2528
- if( inaddr.sin_addr.s_addr == INADDR_NONE ){
2529
- fossil_fatal("not a valid IP address: %s", zIpAddr);
2530
- }
2531
- }else if( flags & HTTP_SERVER_LOCALHOST ){
2532
- inaddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
2529
+ if( flags & HTTP_SERVER_UNIXDOMAINSOCK ){
2530
+ memset(&uxaddr, 0, sizeof(uxaddr));
2531
+ if( strlen(zIpAddr)>sizeof(uxaddr.sun_path) ){
2532
+ fossil_fatal("name of unix-domain socket too big: %s\n"
2533
+ "max size: %d\n", zIpAddr, (int)sizeof(uxaddr.sun_path));
2534
+ }
2535
+ if( unlink(zIpAddr)==-1 && errno!=ENOENT ){
2536
+ fossil_fatal("Cannot remove existing file at %s\n", zIpAddr);
2537
+ }
2538
+ uxaddr.sun_family = AF_UNIX;
2539
+ strncpy(uxaddr.sun_path, zIpAddr, sizeof(uxaddr.sun_path)-1);
2540
+ listener = socket(AF_UNIX, SOCK_STREAM, 0);
25332541
}else{
2534
- inaddr.sin_addr.s_addr = htonl(INADDR_ANY);
2542
+ memset(&inaddr, 0, sizeof(inaddr));
2543
+ inaddr.sin_family = AF_INET;
2544
+ if( zIpAddr ){
2545
+ inaddr.sin_addr.s_addr = inet_addr(zIpAddr);
2546
+ if( inaddr.sin_addr.s_addr == INADDR_NONE ){
2547
+ fossil_fatal("not a valid IP address: %s", zIpAddr);
2548
+ }
2549
+ }else if( flags & HTTP_SERVER_LOCALHOST ){
2550
+ inaddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
2551
+ }else{
2552
+ inaddr.sin_addr.s_addr = htonl(INADDR_ANY);
2553
+ }
2554
+ inaddr.sin_port = htons(iPort);
2555
+ listener = socket(AF_INET, SOCK_STREAM, 0);
25352556
}
2536
- inaddr.sin_port = htons(iPort);
2537
- listener = socket(AF_INET, SOCK_STREAM, 0);
25382557
if( listener<0 ){
25392558
iPort++;
25402559
continue;
25412560
}
25422561
25432562
/* if we can't terminate nicely, at least allow the socket to be reused */
25442563
setsockopt(listener,SOL_SOCKET,SO_REUSEADDR,&opt,sizeof(opt));
2545
-
2546
- if( bind(listener, (struct sockaddr*)&inaddr, sizeof(inaddr))<0 ){
2564
+
2565
+ if( flags & HTTP_SERVER_UNIXDOMAINSOCK ){
2566
+ rc = bind(listener, (struct sockaddr*)&uxaddr, sizeof(uxaddr));
2567
+ }else{
2568
+ rc = bind(listener, (struct sockaddr*)&inaddr, sizeof(inaddr));
2569
+ }
2570
+ if( rc<0 ){
25472571
close(listener);
25482572
iPort++;
25492573
continue;
25502574
}
25512575
break;
25522576
}
25532577
if( iPort>mxPort ){
2554
- if( mnPort==mxPort ){
2578
+ if( flags & HTTP_SERVER_UNIXDOMAINSOCK ){
2579
+ fossil_fatal("unable to listen on unix-domain socket %s", zIpAddr);
2580
+ }else if( mnPort==mxPort ){
25552581
fossil_fatal("unable to open listening socket on port %d", mnPort);
25562582
}else{
25572583
fossil_fatal("unable to open listening socket on any"
25582584
" port in the range %d..%d", mnPort, mxPort);
25592585
}
25602586
}
25612587
if( iPort>mxPort ) return 1;
25622588
listen(listener,10);
2563
- fossil_print("Listening for %s requests on TCP port %d\n",
2564
- (flags & HTTP_SERVER_SCGI)!=0 ? "SCGI" :
2565
- g.httpUseSSL?"TLS-encrypted HTTPS":"HTTP", iPort);
2589
+ if( flags & HTTP_SERVER_UNIXDOMAINSOCK ){
2590
+ fossil_print("Listening for %s requests on unix-domain socket %s\n",
2591
+ (flags & HTTP_SERVER_SCGI)!=0 ? "SCGI" :
2592
+ g.httpUseSSL?"TLS-encrypted HTTPS":"HTTP", zIpAddr);
2593
+ }else{
2594
+ fossil_print("Listening for %s requests on TCP port %d\n",
2595
+ (flags & HTTP_SERVER_SCGI)!=0 ? "SCGI" :
2596
+ g.httpUseSSL?"TLS-encrypted HTTPS":"HTTP", iPort);
2597
+ }
25662598
fflush(stdout);
2567
- if( zBrowser ){
2599
+ if( zBrowser && (flags & HTTP_SERVER_UNIXDOMAINSOCK)==0 ){
25682600
assert( strstr(zBrowser,"%d")!=0 );
25692601
zBrowser = mprintf(zBrowser /*works-like:"%d"*/, iPort);
25702602
#if defined(__CYGWIN__)
25712603
/* On Cygwin, we can do better than "echo" */
25722604
if( fossil_strncmp(zBrowser, "echo ", 5)==0 ){
25732605
--- src/cgi.c
+++ src/cgi.c
@@ -70,16 +70,18 @@
70 # endif
71 # include <winsock2.h>
72 # include <ws2tcpip.h>
73 #else
74 # include <sys/socket.h>
 
75 # include <netinet/in.h>
76 # include <arpa/inet.h>
77 # include <sys/times.h>
78 # include <sys/time.h>
79 # include <sys/wait.h>
80 # include <sys/select.h>
 
81 #endif
82 #ifdef __EMX__
83 typedef int socklen_t;
84 #endif
85 #include <time.h>
@@ -2475,10 +2477,11 @@
2475 #define HTTP_SERVER_SCGI 0x0002 /* SCGI instead of HTTP */
2476 #define HTTP_SERVER_HAD_REPOSITORY 0x0004 /* Was the repository open? */
2477 #define HTTP_SERVER_HAD_CHECKOUT 0x0008 /* Was a checkout open? */
2478 #define HTTP_SERVER_REPOLIST 0x0010 /* Allow repo listing */
2479 #define HTTP_SERVER_NOFORK 0x0020 /* Do not call fork() */
 
2480
2481 #endif /* INTERFACE */
2482
2483 /*
2484 ** Maximum number of child processes that we can have running
@@ -2515,58 +2518,87 @@
2515 socklen_t lenaddr; /* Length of the inaddr structure */
2516 int child; /* PID of the child process */
2517 int nchildren = 0; /* Number of child processes */
2518 struct timeval delay; /* How long to wait inside select() */
2519 struct sockaddr_in inaddr; /* The socket address */
 
2520 int opt = 1; /* setsockopt flag */
2521 int iPort = mnPort;
 
2522
2523 while( iPort<=mxPort ){
2524 memset(&inaddr, 0, sizeof(inaddr));
2525 inaddr.sin_family = AF_INET;
2526 if( zIpAddr ){
2527 inaddr.sin_addr.s_addr = inet_addr(zIpAddr);
2528 if( inaddr.sin_addr.s_addr == INADDR_NONE ){
2529 fossil_fatal("not a valid IP address: %s", zIpAddr);
2530 }
2531 }else if( flags & HTTP_SERVER_LOCALHOST ){
2532 inaddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
 
 
 
2533 }else{
2534 inaddr.sin_addr.s_addr = htonl(INADDR_ANY);
 
 
 
 
 
 
 
 
 
 
 
 
 
2535 }
2536 inaddr.sin_port = htons(iPort);
2537 listener = socket(AF_INET, SOCK_STREAM, 0);
2538 if( listener<0 ){
2539 iPort++;
2540 continue;
2541 }
2542
2543 /* if we can't terminate nicely, at least allow the socket to be reused */
2544 setsockopt(listener,SOL_SOCKET,SO_REUSEADDR,&opt,sizeof(opt));
2545
2546 if( bind(listener, (struct sockaddr*)&inaddr, sizeof(inaddr))<0 ){
 
 
 
 
 
2547 close(listener);
2548 iPort++;
2549 continue;
2550 }
2551 break;
2552 }
2553 if( iPort>mxPort ){
2554 if( mnPort==mxPort ){
 
 
2555 fossil_fatal("unable to open listening socket on port %d", mnPort);
2556 }else{
2557 fossil_fatal("unable to open listening socket on any"
2558 " port in the range %d..%d", mnPort, mxPort);
2559 }
2560 }
2561 if( iPort>mxPort ) return 1;
2562 listen(listener,10);
2563 fossil_print("Listening for %s requests on TCP port %d\n",
2564 (flags & HTTP_SERVER_SCGI)!=0 ? "SCGI" :
2565 g.httpUseSSL?"TLS-encrypted HTTPS":"HTTP", iPort);
 
 
 
 
 
 
2566 fflush(stdout);
2567 if( zBrowser ){
2568 assert( strstr(zBrowser,"%d")!=0 );
2569 zBrowser = mprintf(zBrowser /*works-like:"%d"*/, iPort);
2570 #if defined(__CYGWIN__)
2571 /* On Cygwin, we can do better than "echo" */
2572 if( fossil_strncmp(zBrowser, "echo ", 5)==0 ){
2573
--- src/cgi.c
+++ src/cgi.c
@@ -70,16 +70,18 @@
70 # endif
71 # include <winsock2.h>
72 # include <ws2tcpip.h>
73 #else
74 # include <sys/socket.h>
75 # include <sys/un.h>
76 # include <netinet/in.h>
77 # include <arpa/inet.h>
78 # include <sys/times.h>
79 # include <sys/time.h>
80 # include <sys/wait.h>
81 # include <sys/select.h>
82 # include <errno.h>
83 #endif
84 #ifdef __EMX__
85 typedef int socklen_t;
86 #endif
87 #include <time.h>
@@ -2475,10 +2477,11 @@
2477 #define HTTP_SERVER_SCGI 0x0002 /* SCGI instead of HTTP */
2478 #define HTTP_SERVER_HAD_REPOSITORY 0x0004 /* Was the repository open? */
2479 #define HTTP_SERVER_HAD_CHECKOUT 0x0008 /* Was a checkout open? */
2480 #define HTTP_SERVER_REPOLIST 0x0010 /* Allow repo listing */
2481 #define HTTP_SERVER_NOFORK 0x0020 /* Do not call fork() */
2482 #define HTTP_SERVER_UNIXDOMAINSOCK 0x0040 /* Use a unix-domain socket */
2483
2484 #endif /* INTERFACE */
2485
2486 /*
2487 ** Maximum number of child processes that we can have running
@@ -2515,58 +2518,87 @@
2518 socklen_t lenaddr; /* Length of the inaddr structure */
2519 int child; /* PID of the child process */
2520 int nchildren = 0; /* Number of child processes */
2521 struct timeval delay; /* How long to wait inside select() */
2522 struct sockaddr_in inaddr; /* The socket address */
2523 struct sockaddr_un uxaddr; /* The address for unix-domain sockets */
2524 int opt = 1; /* setsockopt flag */
2525 int rc; /* Result code from system calls */
2526 int iPort = mnPort; /* Port to try to use */
2527
2528 while( iPort<=mxPort ){
2529 if( flags & HTTP_SERVER_UNIXDOMAINSOCK ){
2530 memset(&uxaddr, 0, sizeof(uxaddr));
2531 if( strlen(zIpAddr)>sizeof(uxaddr.sun_path) ){
2532 fossil_fatal("name of unix-domain socket too big: %s\n"
2533 "max size: %d\n", zIpAddr, (int)sizeof(uxaddr.sun_path));
2534 }
2535 if( unlink(zIpAddr)==-1 && errno!=ENOENT ){
2536 fossil_fatal("Cannot remove existing file at %s\n", zIpAddr);
2537 }
2538 uxaddr.sun_family = AF_UNIX;
2539 strncpy(uxaddr.sun_path, zIpAddr, sizeof(uxaddr.sun_path)-1);
2540 listener = socket(AF_UNIX, SOCK_STREAM, 0);
2541 }else{
2542 memset(&inaddr, 0, sizeof(inaddr));
2543 inaddr.sin_family = AF_INET;
2544 if( zIpAddr ){
2545 inaddr.sin_addr.s_addr = inet_addr(zIpAddr);
2546 if( inaddr.sin_addr.s_addr == INADDR_NONE ){
2547 fossil_fatal("not a valid IP address: %s", zIpAddr);
2548 }
2549 }else if( flags & HTTP_SERVER_LOCALHOST ){
2550 inaddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
2551 }else{
2552 inaddr.sin_addr.s_addr = htonl(INADDR_ANY);
2553 }
2554 inaddr.sin_port = htons(iPort);
2555 listener = socket(AF_INET, SOCK_STREAM, 0);
2556 }
 
 
2557 if( listener<0 ){
2558 iPort++;
2559 continue;
2560 }
2561
2562 /* if we can't terminate nicely, at least allow the socket to be reused */
2563 setsockopt(listener,SOL_SOCKET,SO_REUSEADDR,&opt,sizeof(opt));
2564
2565 if( flags & HTTP_SERVER_UNIXDOMAINSOCK ){
2566 rc = bind(listener, (struct sockaddr*)&uxaddr, sizeof(uxaddr));
2567 }else{
2568 rc = bind(listener, (struct sockaddr*)&inaddr, sizeof(inaddr));
2569 }
2570 if( rc<0 ){
2571 close(listener);
2572 iPort++;
2573 continue;
2574 }
2575 break;
2576 }
2577 if( iPort>mxPort ){
2578 if( flags & HTTP_SERVER_UNIXDOMAINSOCK ){
2579 fossil_fatal("unable to listen on unix-domain socket %s", zIpAddr);
2580 }else if( mnPort==mxPort ){
2581 fossil_fatal("unable to open listening socket on port %d", mnPort);
2582 }else{
2583 fossil_fatal("unable to open listening socket on any"
2584 " port in the range %d..%d", mnPort, mxPort);
2585 }
2586 }
2587 if( iPort>mxPort ) return 1;
2588 listen(listener,10);
2589 if( flags & HTTP_SERVER_UNIXDOMAINSOCK ){
2590 fossil_print("Listening for %s requests on unix-domain socket %s\n",
2591 (flags & HTTP_SERVER_SCGI)!=0 ? "SCGI" :
2592 g.httpUseSSL?"TLS-encrypted HTTPS":"HTTP", zIpAddr);
2593 }else{
2594 fossil_print("Listening for %s requests on TCP port %d\n",
2595 (flags & HTTP_SERVER_SCGI)!=0 ? "SCGI" :
2596 g.httpUseSSL?"TLS-encrypted HTTPS":"HTTP", iPort);
2597 }
2598 fflush(stdout);
2599 if( zBrowser && (flags & HTTP_SERVER_UNIXDOMAINSOCK)==0 ){
2600 assert( strstr(zBrowser,"%d")!=0 );
2601 zBrowser = mprintf(zBrowser /*works-like:"%d"*/, iPort);
2602 #if defined(__CYGWIN__)
2603 /* On Cygwin, we can do better than "echo" */
2604 if( fossil_strncmp(zBrowser, "echo ", 5)==0 ){
2605
+16 -1
--- src/main.c
+++ src/main.c
@@ -3186,10 +3186,12 @@
31863186
** --repolist If REPOSITORY is dir, URL "/" lists repos
31873187
** --scgi Accept SCGI rather than HTTP
31883188
** --skin LABEL Use override skin LABEL, or the site's default skin if
31893189
** LABEL is an empty string.
31903190
** --th-trace Trace TH1 execution (for debugging purposes)
3191
+** --unix-socket NAME Listen on unix-domain socket NAME rather than on a
3192
+** TCP/IP port.
31913193
** --usepidkey Use saved encryption key from parent process. This is
31923194
** only necessary when using SEE on Windows or Linux.
31933195
**
31943196
** See also: [[cgi]], [[http]], [[winsrv]]
31953197
*/
@@ -3207,11 +3209,11 @@
32073209
const char *zTimeout = 0; /* Max runtime of any single HTTP request */
32083210
#endif
32093211
int allowRepoList; /* List repositories on URL "/" */
32103212
const char *zAltBase; /* Argument to the --baseurl option */
32113213
const char *zFileGlob; /* Static content must match this */
3212
- char *zIpAddr = 0; /* Bind to this IP address */
3214
+ char *zIpAddr = 0; /* Bind to this IP address or UN socket */
32133215
int fCreate = 0; /* The --create flag */
32143216
int fNoBrowser = 0; /* Do not auto-launch web-browser */
32153217
const char *zInitPage = 0; /* Start on this page. --page option */
32163218
int findServerArg = 2; /* argv index for find_server_repository() */
32173219
char *zRemote = 0; /* Remote host on which to run "fossil ui" */
@@ -3283,10 +3285,23 @@
32833285
g.zMainMenuFile = find_option("mainmenu",0,1);
32843286
if( g.zMainMenuFile!=0 && file_size(g.zMainMenuFile,ExtFILE)<0 ){
32853287
fossil_fatal("Cannot read --mainmenu file %s", g.zMainMenuFile);
32863288
}
32873289
if( find_option("acme",0,0)!=0 ) g.fAllowACME = 1;
3290
+ zIpAddr = (char*)find_option("unix-socket",0,1);
3291
+ if( zIpAddr ){
3292
+#if defined(_WIN32)
3293
+ fossil_fatal("unix sockets are not supported on Windows");
3294
+#endif
3295
+ if( zPort ){
3296
+ fossil_fatal("cannot specify a port number for a unix socket");
3297
+ }
3298
+ if( isUiCmd && !fNoBrowser ){
3299
+ fossil_fatal("cannot start a web-browser on a unix socket");
3300
+ }
3301
+ flags |= HTTP_SERVER_UNIXDOMAINSOCK;
3302
+ }
32883303
32893304
/* Undocumented option: --debug-nofork
32903305
**
32913306
** This sets the HTTP_SERVER_NOFORK flag, which causes only the
32923307
** very first incoming TCP/IP connection to be processed. Used for
32933308
--- src/main.c
+++ src/main.c
@@ -3186,10 +3186,12 @@
3186 ** --repolist If REPOSITORY is dir, URL "/" lists repos
3187 ** --scgi Accept SCGI rather than HTTP
3188 ** --skin LABEL Use override skin LABEL, or the site's default skin if
3189 ** LABEL is an empty string.
3190 ** --th-trace Trace TH1 execution (for debugging purposes)
 
 
3191 ** --usepidkey Use saved encryption key from parent process. This is
3192 ** only necessary when using SEE on Windows or Linux.
3193 **
3194 ** See also: [[cgi]], [[http]], [[winsrv]]
3195 */
@@ -3207,11 +3209,11 @@
3207 const char *zTimeout = 0; /* Max runtime of any single HTTP request */
3208 #endif
3209 int allowRepoList; /* List repositories on URL "/" */
3210 const char *zAltBase; /* Argument to the --baseurl option */
3211 const char *zFileGlob; /* Static content must match this */
3212 char *zIpAddr = 0; /* Bind to this IP address */
3213 int fCreate = 0; /* The --create flag */
3214 int fNoBrowser = 0; /* Do not auto-launch web-browser */
3215 const char *zInitPage = 0; /* Start on this page. --page option */
3216 int findServerArg = 2; /* argv index for find_server_repository() */
3217 char *zRemote = 0; /* Remote host on which to run "fossil ui" */
@@ -3283,10 +3285,23 @@
3283 g.zMainMenuFile = find_option("mainmenu",0,1);
3284 if( g.zMainMenuFile!=0 && file_size(g.zMainMenuFile,ExtFILE)<0 ){
3285 fossil_fatal("Cannot read --mainmenu file %s", g.zMainMenuFile);
3286 }
3287 if( find_option("acme",0,0)!=0 ) g.fAllowACME = 1;
 
 
 
 
 
 
 
 
 
 
 
 
 
3288
3289 /* Undocumented option: --debug-nofork
3290 **
3291 ** This sets the HTTP_SERVER_NOFORK flag, which causes only the
3292 ** very first incoming TCP/IP connection to be processed. Used for
3293
--- src/main.c
+++ src/main.c
@@ -3186,10 +3186,12 @@
3186 ** --repolist If REPOSITORY is dir, URL "/" lists repos
3187 ** --scgi Accept SCGI rather than HTTP
3188 ** --skin LABEL Use override skin LABEL, or the site's default skin if
3189 ** LABEL is an empty string.
3190 ** --th-trace Trace TH1 execution (for debugging purposes)
3191 ** --unix-socket NAME Listen on unix-domain socket NAME rather than on a
3192 ** TCP/IP port.
3193 ** --usepidkey Use saved encryption key from parent process. This is
3194 ** only necessary when using SEE on Windows or Linux.
3195 **
3196 ** See also: [[cgi]], [[http]], [[winsrv]]
3197 */
@@ -3207,11 +3209,11 @@
3209 const char *zTimeout = 0; /* Max runtime of any single HTTP request */
3210 #endif
3211 int allowRepoList; /* List repositories on URL "/" */
3212 const char *zAltBase; /* Argument to the --baseurl option */
3213 const char *zFileGlob; /* Static content must match this */
3214 char *zIpAddr = 0; /* Bind to this IP address or UN socket */
3215 int fCreate = 0; /* The --create flag */
3216 int fNoBrowser = 0; /* Do not auto-launch web-browser */
3217 const char *zInitPage = 0; /* Start on this page. --page option */
3218 int findServerArg = 2; /* argv index for find_server_repository() */
3219 char *zRemote = 0; /* Remote host on which to run "fossil ui" */
@@ -3283,10 +3285,23 @@
3285 g.zMainMenuFile = find_option("mainmenu",0,1);
3286 if( g.zMainMenuFile!=0 && file_size(g.zMainMenuFile,ExtFILE)<0 ){
3287 fossil_fatal("Cannot read --mainmenu file %s", g.zMainMenuFile);
3288 }
3289 if( find_option("acme",0,0)!=0 ) g.fAllowACME = 1;
3290 zIpAddr = (char*)find_option("unix-socket",0,1);
3291 if( zIpAddr ){
3292 #if defined(_WIN32)
3293 fossil_fatal("unix sockets are not supported on Windows");
3294 #endif
3295 if( zPort ){
3296 fossil_fatal("cannot specify a port number for a unix socket");
3297 }
3298 if( isUiCmd && !fNoBrowser ){
3299 fossil_fatal("cannot start a web-browser on a unix socket");
3300 }
3301 flags |= HTTP_SERVER_UNIXDOMAINSOCK;
3302 }
3303
3304 /* Undocumented option: --debug-nofork
3305 **
3306 ** This sets the HTTP_SERVER_NOFORK flag, which causes only the
3307 ** very first incoming TCP/IP connection to be processed. Used for
3308

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button