aboutsummaryrefslogtreecommitdiff
path: root/TODO
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2023-07-25 12:25:34 +0200
committerGuillaume Le Vaillant <glv@posteo.net>2023-07-25 12:25:34 +0200
commit81f04174173f0da7348de9cad100f20b607e6a8c (patch)
treecc73a6c83d9ce53b546a4ece26db57a631b0220f /TODO
parent76e041f9eef85bb039c5251d3350c62ee2066883 (diff)
downloadguix-81f04174173f0da7348de9cad100f20b607e6a8c.tar.gz
guix-81f04174173f0da7348de9cad100f20b607e6a8c.zip
gnu: hackrf: Update to 2023.01.1.
* gnu/packages/radio.scm (hackrf): Update to 2023.01.1.
Diffstat (limited to 'TODO')
0 files changed, 0 insertions, 0 deletions
ng))) ;XXX: coarse-grain (map file-system-mapping->bind-mount (filter (lambda (mapping) (file-exists? (file-system-mapping-source mapping))) mappings))))) (define* (exec-command* command #:key user group log-file pid-file (supplementary-groups '()) (directory "/") (environment-variables (environ))) "Like 'exec-command', but first restore signal handles modified by shepherd (PID 1)." ;; First restore the default handlers. (for-each (cut sigaction <> SIG_DFL) %precious-signals) ;; Unblock any signals that have been blocked by the parent process. (unblock-signals %precious-signals) (mkdir-p "/var/run") (clean-up pid-file) (exec-command command #:user user #:group group #:supplementary-groups supplementary-groups #:log-file log-file #:directory directory #:environment-variables environment-variables)) (define* (fork+exec-command/container command #:key pid #:allow-other-keys #:rest args) "This is a variant of 'fork+exec-command' procedure, that joins the namespaces of process PID beforehand. If there is no support for containers, on Hurd systems for instance, fallback to direct forking." (define (strip-pid args) ;; TODO: Replace with 'strip-keyword-arguments' when that no longer pulls ;; in (guix config). (let loop ((args args) (result '())) (match args (() (reverse result)) ((#:pid _ . rest) (loop rest result)) ((head . rest) (loop rest (cons head result)))))) (let ((container-support? (file-exists? "/proc/self/ns"))) (if (and container-support? (not (and pid (= pid (getpid))))) (container-excursion* pid (lambda () ;; Note: In the Shepherd 0.9, 'fork+exec-command' expects to be ;; called from the shepherd process (because it creates a pipe to ;; capture stdout/stderr and spawns a logging fiber) so we cannot ;; use it here. (match (primitive-fork) (0 (dynamic-wind (const #t) (lambda () (apply exec-command* command (strip-pid args))) (lambda () (primitive-_exit 127)))) (pid pid)))) ;XXX: assuming the same PID namespace (apply fork+exec-command command (strip-pid args))))) ;; Local Variables: ;; eval: (put 'container-excursion* 'scheme-indent-function 1) ;; End: ;;; shepherd.scm ends here