Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch backoffice-full-close Excluding Merge-Ins
This is equivalent to a diff from 918e1ddd8e to b6aadace39
|
2018-08-08
| ||
| 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: c09b2512b3 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: b6aadace39 user: drh tags: backoffice-full-close) | |
| 18:13 | Set the default backoffice-nodelay back to off. ... (check-in: 353a4e12d5 user: drh tags: backoffice-full-close) | |
| 17:57 | In the backoffice process, close the 0, 1, and 2 file descriptiors and reopen them as /dev/null, on unix. ... (check-in: 6865fb72cf 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: 4ed14b1f3f user: wyoung tags: trunk) | |
| 16:20 | If the "fds" query parameter is provided, then the /test-backoffice-lease webpage shows the open file descriptors. ... (check-in: 918e1ddd8e user: drh tags: trunk) | |
| 14:40 | Turn backoffice-nodelay on by default. ... (check-in: af599d6adc user: drh tags: trunk) | |
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 ** |
| ︙ | ︙ |