Fossil SCM
Make sure the backoffice does not try to reuse file descriptors that it has previously closed.
Commit
458ced35354314b1361df4dd627bb1ae7b26352edb110eb613e478fe684f309c
Parent
2b3569d19f207e2…
1 file changed
+3
+3
| --- src/backoffice.c | ||
| +++ src/backoffice.c | ||
| @@ -679,10 +679,13 @@ | ||
| 679 | 679 | for(i=0; i<=2; i++){ |
| 680 | 680 | close(i); |
| 681 | 681 | open("/dev/null", O_RDWR); |
| 682 | 682 | } |
| 683 | 683 | for(i=3; i<100; i++){ close(i); } |
| 684 | + g.fDebug = 0; | |
| 685 | + g.httpIn = 0; | |
| 686 | + g.httpOut = 0; | |
| 684 | 687 | db_open_repository(backofficeDb); |
| 685 | 688 | backofficeDb = "x"; |
| 686 | 689 | backoffice_thread(); |
| 687 | 690 | db_close(1); |
| 688 | 691 | backofficeTrace("/***** Backoffice Child %d exits *****/\n", GETPID()); |
| 689 | 692 |
| --- src/backoffice.c | |
| +++ src/backoffice.c | |
| @@ -679,10 +679,13 @@ | |
| 679 | for(i=0; i<=2; i++){ |
| 680 | close(i); |
| 681 | open("/dev/null", O_RDWR); |
| 682 | } |
| 683 | for(i=3; i<100; i++){ close(i); } |
| 684 | db_open_repository(backofficeDb); |
| 685 | backofficeDb = "x"; |
| 686 | backoffice_thread(); |
| 687 | db_close(1); |
| 688 | backofficeTrace("/***** Backoffice Child %d exits *****/\n", GETPID()); |
| 689 |
| --- src/backoffice.c | |
| +++ src/backoffice.c | |
| @@ -679,10 +679,13 @@ | |
| 679 | for(i=0; i<=2; i++){ |
| 680 | close(i); |
| 681 | open("/dev/null", O_RDWR); |
| 682 | } |
| 683 | for(i=3; i<100; i++){ close(i); } |
| 684 | g.fDebug = 0; |
| 685 | g.httpIn = 0; |
| 686 | g.httpOut = 0; |
| 687 | db_open_repository(backofficeDb); |
| 688 | backofficeDb = "x"; |
| 689 | backoffice_thread(); |
| 690 | db_close(1); |
| 691 | backofficeTrace("/***** Backoffice Child %d exits *****/\n", GETPID()); |
| 692 |