+(define-public (system-with-env cmd env)
+
+ "Execute CMD in fork, with ENV (a list of strings) as the environment"
+ (let*
+ ;; laziness: should use execle?
+
+ ((pid (primitive-fork)))
+ (if (= 0 pid)
+ ;; child
+ (begin
+ (environ env)
+ (system cmd))
+
+ ;; parent
+ (cdr (waitpid pid)))))
+