support for copying the temporary file from an existing file
This commit is contained in:
@@ -8,13 +8,15 @@
|
||||
(or/c char-numeric? char-alphabetic? (curry char=? #\-))
|
||||
(string->list call))))
|
||||
|
||||
(define (our-make-temporary-file)
|
||||
(define (our-make-temporary-file [copy-from #f])
|
||||
;; when deployed as a systemd socket, this program is expected to be
|
||||
;; ran with PrivateTmp. however, in case this is not true, we still
|
||||
;; make our own directory. "red", the restricted version of "ed",
|
||||
;; has no facility for getting outside of the directory we start it
|
||||
;; in.
|
||||
(make-temporary-file "red.~a" #:base-dir (make-temporary-directory)))
|
||||
(make-temporary-file "red.~a"
|
||||
#:copy-from copy-from
|
||||
#:base-dir (make-temporary-directory)))
|
||||
|
||||
;; unfortunately, we cannot just exec red and let it take over the
|
||||
;; I/O. ed, being the standard text editor, only works with standard
|
||||
|
||||
Reference in New Issue
Block a user