phpのsystem関数が終わらなくなったら
標準出力を捨てたら動いた。。
現象
system関数の後続のロジックが動作しなかった
system("hogehoge -fugafuga"); // ロジックが続く
暫定対策
以下とすると動作した
system("hogehoge -fugafuga > /dev/null");
// ロジックが続く
下記が該当してるっぽいけど、 PHPがハングしたらthe program(php)は永遠に終わらないような気がするけどどうなってんだろう
何が起きてるのか分からん。。
Note: If a program is started with this function, in order for it to continue running in the background, the output of the program must be redirected to a file or another output stream. Failing to do so will cause PHP to hang until the execution of the program ends.
参考
【解決?】bash on windowsでnvimのclipboardとしてwin32yank使うと
- 現在の作業ディレクトリを変換できません。C:\WINDOWS\System32 を使用します
- Unable to translate current working directory. Using C:\WINDOWS\System32
が表示される。なんとかしたい
解決?
windows側が対応した?
下記しても、コピペができるようになってる。
unlink /usr/bin/win32yank
当然unlinkしたのでCheckHealthは以下、それでもコピペができる
## Clipboard (optional) - WARNING: No clipboard tool found. Clipboard registers will not work. - SUGGESTIONS: - :help clipboard
巷の天才たちよ、何が起きたのか教えてください
過去の状況
調査
- http://www.buildinsider.net/enterprise/bashonwindows/creatorsupdate
- https://github.com/equalsraf/win32yank/issues/3
- https://github.com/neovim/neovim/issues/6227
原因
調査の一つ目の記事が原因だ(最初読んだときは何を言っているのか全く分からなかったorz
ただし、BoWから起動したWindowsアプリケーションの作業フォルダーを、BoWのフォルダーに指定することはできない。 例えば、Windowsのコマンドプロンプトからcode .と入力すると、現在のフォルダーを作業フォルダーにして、Visual Studio Codeが起動する(※もちろんインストールしていた場合)。 同様に、Bashシェルからcode .と実行した場合には、BoW側の作業フォルダーは使用できないため、図4のようにWindows側のC:\WINDOWS\System32フォルダーが作業フォルダーに設定される。
Bashシェルからwin32yank.exeを実行した場合には、BoW側の作業フォルダーは使用できないってことか
運用回避
つまり、/mnt/c/側で実行すれば表示されない
/home/[user name]/の下に/mnt/c側のシンボリックリックを張っておいて、
作業時はcdしてから作業すればとりあえずは表示されずに済む
うーん、いまいち
標準エラー出力として表示しているなら捨てればよさそうだけど、、
あるいは、
/usr/local/share/nvim/runtime/autoload/provider/clipboard.vim
いじる?
elseif executable('win32yank') let s:copy['+'] = 'win32yank -i --crlf' let s:paste['+'] = 'win32yank -o --lf 2>/dev/null' let s:copy['*'] = s:copy['+'] let s:paste['*'] = s:paste['+'] return 'win32yank' endif