使用nix-shell(1)中建议的技巧 In the environment of the derivation, run the shell(Use --run to use a non-interactive shell instead.)导致错误:/tmp/nix-shell-15399-0&
我正在生成一个fish shell作为后台作业,并从中生成inotifywait (一个监视指定文件并仅在其更改后才返回的进程)。但是,稍后在一个未指定的时间点(不能保证inotifywait已经返回),我将杀死产生inotifywait的fish shell。returned# the fish process is now terminated, but inoyifywait remains 我现在使用的临时技巧是简单地更新正在监视的文件的访问时间我在linux 4.20.1
理想情况下,我希望使用shell内置time命令(这是在Linux系统上)来运行它们。这意味着,为了在shell中手动运行时捕获时间输出,需要显式地使用子shell并重定向子shell的stderr:$ perl --version | head -n2
This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_6