18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
;;
(declare (unit portlogger))
;; (declare (uses db))
(declare (uses commonmod))
(declare (uses configfmod))
(declare (uses dbmod))
(module portlogger
*
(import scheme chicken data-structures extras ports)
(import (srfi 18) extras tcp s11n)
(use (prefix sqlite3 sqlite3:) srfi-1 posix srfi-69 hostinfo dot-locking z3)
(import commonmod)
(import configfmod)
(import dbmod)
;; lsof -i
(define (portlogger:open-db fname)
(let* ((avail (tasks:wait-on-journal fname 5 remove: #t)) ;; wait up to about 10 seconds for the journal to go away
|
>
>
|
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
;;
(declare (unit portlogger))
;; (declare (uses db))
(declare (uses commonmod))
(declare (uses debugprint))
(declare (uses configfmod))
(declare (uses dbmod))
(module portlogger
*
(import scheme chicken data-structures extras ports)
(import (srfi 18) extras tcp s11n)
(use (prefix sqlite3 sqlite3:) srfi-1 posix srfi-69 hostinfo dot-locking z3)
(import commonmod)
(import debugprint)
(import configfmod)
(import dbmod)
;; lsof -i
(define (portlogger:open-db fname)
(let* ((avail (tasks:wait-on-journal fname 5 remove: #t)) ;; wait up to about 10 seconds for the journal to go away
|