[英]IEx block with sudo and System.cmd(“mount”)
Some precision : 一些精度:
$> iex --version
Erlang/OTP 20 [erts-9.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false]
IEx 1.4.4
$> mix --version
Erlang/OTP 20 [erts-9.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false]
Mix 1.4.4
I'm a french people and i don't understand why 我是法国人,我不明白为什么
$> iex -S mix
have some bugs with : 有一些错误:
$> sudo iex -S mix
I want execute the command in IEx : 我想在IEx中执行命令:
System.cmd("mount", ["-t", "ecryptfs", ".private", "private", "-o", ~s(key=passphrase,passphrase_passwd="pass",ecryptfs_enable_filename_crypto=n,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_passthrough=n)], [stderr_to_stdout: true])
For test and mount a ecryptfs partition. 用于测试和安装ecryptfs分区。 In 在
$> iex -S mix
iex(2)> System.cmd("mount", ["-t", "ecryptfs", ".private", "private", "-o", ~s(key=passphrase,passphrase_passwd="pass",ecryptfs_enable_filename_crypto=n,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_passthrough=n)], [stderr_to_stdout: true])
{"mount: mount : seul le superutilisateur peut utiliser l'option « --options »\n",1}
And I have the correct value, unprivileged mount . 我拥有正确的价值,无特权的坐骑 。
With: 附:
$> sudo iex -S mix
iex(2)> System.cmd("mount", ["-t", "ecryptfs", ".private", "private", "-o", ~s(key=passphrase,passphrase_passwd="pass",ecryptfs_enable_filename_crypto=n,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_passthrough=n)], [stderr_to_stdout: true])
The command bugs and prints anything. 该命令会错误并打印任何内容。 It just block. 它只是块。 Without return error code, without anything, just blocking. 没有返回错误代码,什么也没有,只是阻塞。 IEx don't print anything. IEx不打印任何内容。
I have a screenshot for that bug : 我有该错误的屏幕截图:
Okay, System.cmd don't want to quote in argument. 好的,System.cmd不想在参数中引用。 Okay. 好的。 :/ :/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.