Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix the backoffice processes on unix so that they close file descriptors 0, 1, and 2 and reopen them on /dev/null, so as not to interfere with parent processes in any way. Restore the default of backoffice-nodelay back to off. Remove the /test-backoffice-lease webpage, which did not work correctly. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
c09b2512b3f86e507deec2d418dd9961 |
User & Date: | drh 2018-08-08 18:17:42.964 |
Context
2018-08-08
| ||
18:29 | Fixed some Markdown formatting problems in www/emaildesign.md. Made a few minor grammar tweaks while in there. ... (check-in: 30716e3c user: wyoung tags: trunk) | |
18:17 | Fix the backoffice processes on unix so that they close file descriptors 0, 1, and 2 and reopen them on /dev/null, so as not to interfere with parent processes in any way. Restore the default of backoffice-nodelay back to off. Remove the /test-backoffice-lease webpage, which did not work correctly. ... (check-in: c09b2512 user: drh tags: trunk) | |
18:15 | Remove the /test-backoffice-lease webpage, since it doesn't really work correctly. Use only the "fossil test-backoffice-lease" command moving forward. We can wrap that command in a Wapp script if necessary. ... (Closed-Leaf check-in: b6aadace user: drh tags: backoffice-full-close) | |
17:21 | Added initial version of www/forum.wiki document and a link to it from the front page. ... (check-in: 4ed14b1f user: wyoung tags: trunk) | |
Changes
Changes to src/backoffice.c.
︙ | ︙ | |||
162 163 164 165 166 167 168 | ** a backoffice will delay a UI thread, so we don't want them to run for ** longer than needed. */ void backoffice_no_delay(void){ backofficeNoDelay = 1; } | < < < < < < < < | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | ** a backoffice will delay a UI thread, so we don't want them to run for ** longer than needed. */ void backoffice_no_delay(void){ backofficeNoDelay = 1; } /* ** Sleeps for the specified number of milliseconds -OR- until interrupted ** by another thread (if supported by the underlying platform). Non-zero ** will be returned if the sleep was interrupted. */ static int backofficeSleep(int milliseconds){ #if defined(_WIN32) |
︙ | ︙ | |||
439 440 441 442 443 444 445 | if( x.tmNext>0 ){ fossil_print(" (now%+d)\n",x.tmNext-tmNow); }else{ fossil_print("\n"); } } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | if( x.tmNext>0 ){ fossil_print(" (now%+d)\n",x.tmNext-tmNow); }else{ fossil_print("\n"); } } /* ** If backoffice processing is needed set the backofficeDb variable to the ** name of the database file. If no backoffice processing is needed, ** this routine makes no changes to state. */ void backoffice_check_if_needed(void){ Lease x; |
︙ | ︙ | |||
596 597 598 599 600 601 602 | backofficeWriteLease(&x); db_end_transaction(0); backofficeTrace("/***** Begin Backoffice Processing %d *****/\n", GETPID()); backoffice_work(); break; } | | | 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 | backofficeWriteLease(&x); db_end_transaction(0); backofficeTrace("/***** Begin Backoffice Processing %d *****/\n", GETPID()); backoffice_work(); break; } if( backofficeNoDelay || db_get_boolean("backoffice-nodelay",0) ){ /* If the no-delay flag is set, exit immediately rather than queuing ** up. Assume that some future request will come along and handle any ** necessary backoffice work. */ db_end_transaction(0); break; } /* This process needs to queue up and wait for the current lease |
︙ | ︙ | |||
719 720 721 722 723 724 725 | GETPID(), (int)pid); return; } if( pid==0 ){ /* This is the child of a successful fork(). Run backoffice. */ int i; setsid(); | > | > > > | 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | GETPID(), (int)pid); return; } if( pid==0 ){ /* This is the child of a successful fork(). Run backoffice. */ int i; setsid(); for(i=0; i<=2; i++){ close(i); open("/dev/null", O_RDWR); } for(i=3; i<100; i++){ close(i); } db_open_repository(backofficeDb); backofficeDb = "x"; backoffice_thread(); db_close(1); backofficeTrace("/***** Backoffice Child %d exits *****/\n", GETPID()); exit(0); } |
︙ | ︙ |
Changes to src/db.c.
︙ | ︙ | |||
3021 3022 3023 3024 3025 3026 3027 | /* ** SETTING: autosync-tries width=16 default=1 ** If autosync is enabled setting this to a value greater ** than zero will cause autosync to try no more than this ** number of attempts if there is a sync failure. */ /* | | | 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 | /* ** SETTING: autosync-tries width=16 default=1 ** If autosync is enabled setting this to a value greater ** than zero will cause autosync to try no more than this ** number of attempts if there is a sync failure. */ /* ** SETTING: backoffice-nodelay boolean default=off ** If backoffice-nodelay is true, then the backoffice processing ** will never invoke sleep(). If it has nothing useful to do, ** it simply exits. */ /* ** SETTING: backoffice-logfile width=40 ** If backoffice-logfile is not an empty string and is a valid |
︙ | ︙ |
Changes to src/style.c.
︙ | ︙ | |||
17 18 19 20 21 22 23 | ** ** This file contains code to implement the basic web page look and feel. ** */ #include "VERSION.h" #include "config.h" #include "style.h" | < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ** ** This file contains code to implement the basic web page look and feel. ** */ #include "VERSION.h" #include "config.h" #include "style.h" /* ** Elements of the submenu are collected into the following ** structure and displayed below the main menu. ** ** Populate these structure with calls to ** |
︙ | ︙ |