Hi,

Maxim Cournoyer <[email protected]> skribis:

> +                             (start #~(lambda _
> +                                        (mkdir "/etc/testdir")
> +                                        (chdir "/etc/testdir")
> +                                        (invoke #$(file-append coreutils 
> "/bin/touch")
> +                                                "new-file.txt")

[...]

> You should see upon inspection that:
>
> root@komputilo ~# ls /new-file.txt 
> /new-file.txt                        # wrong place
> root@komputilo ~# ls /etc/testdir/   # empty

That’s because ‘invoke’ uses ‘system*’, which is in fact within the
‘shepherd’ process an alias for ‘spawn-command’.

This is fixed in 8d88024e0898dd7d4581c4e977c9786af734a855, which will be
in 1.0.4.

However generally speaking it’s a good idea to leave the current
directory of the ‘shepherd’ process unchanged as bad things could happen
otherwise (though ‘with-directory-excursion’ from (shepherd support)
should be safe.)

Thanks,
Ludo’.



Reply via email to