Comments (7)
謎:setpgid()
を呼んだとしても、プロセスグループIDが変化しない(Vimと同じになる)。本来なら新しいプロセスグループが作成されるはずなのだが……。
from vimproc.vim.
プロセスグループIDの件は setsid()
してからsetpgid()
することで解決した。ただし副作用はあるかもしれない。
変更前
PID PGID SID COMMAND
16159 16159 16159 gvim
16475 16159 16159 [git] <defunct>
16480 16159 16159 [git] <defunct>
16484 16159 16159 [git] <defunct>
16487 16159 16159 [git] <defunct>
16788 16159 16159 [git] <defunct>
16798 16159 16159 [git] <defunct>
16811 16159 16159 [git] <defunct>
16926 16159 16159 [git] <defunct>
17109 16159 16159 [git] <defunct>
17115 16159 16159 [git] <defunct>
17292 16159 16159 [git] <defunct>
17296 16159 16159 [git] <defunct>
17447 16159 16159 [git] <defunct>
17455 16159 16159 [git] <defunct>
17650 16159 16159 [git] <defunct>
17653 16159 16159 [git] <defunct>
17807 16159 16159 [git] <defunct>
17815 16159 16159 [git] <defunct>
18011 16159 16159 [git] <defunct>
18014 16159 16159 [git] <defunct>
18167 16159 16159 [git] <defunct>
18175 16159 16159 [git] <defunct>
18347 16159 16159 [git] <defunct>
18355 16159 16159 [git] <defunct>
変更後
PID PGID SID COMMAND
20916 20916 20916 gvim
21230 21230 20916 [git] <defunct>
21238 21238 20916 [git] <defunct>
21242 21242 20916 [git] <defunct>
21253 21253 20916 [git] <defunct>
21541 21541 20916 [git] <defunct>
21549 21549 20916 [git] <defunct>
21559 21559 20916 [git] <defunct>
21696 21696 20916 [git] <defunct>
21862 21862 20916 [git] <defunct>
21865 21865 20916 [git] <defunct>
22047 22047 20916 [git] <defunct>
22050 22050 20916 [git] <defunct>
22203 22203 20916 [git] <defunct>
22238 22238 20916 [git] <defunct>
22402 22402 20916 [git] <defunct>
22408 22408 20916 [git] <defunct>
22588 22588 20916 [git] <defunct>
22589 22589 20916 [git] <defunct>
22743 22743 20916 [git] <defunct>
22751 22751 20916 [git] <defunct>
22946 22946 20916 [git] <defunct>
22948 22948 20916 [git] <defunct>
23103 23103 20916 [git] <defunct>
23108 23108 20916 [git] <defunct>
しかし、:Unite neobundle/update -log
の件は解消していない。なぜかゾンビが残ってしまう。
このゾンビプロセスはなんか違うように感じている。Vimから直接起動したPID,PGIDとは異なるようだ。
from vimproc.vim.
いろいろ調べました。setpgid()
は動作していることを確認。これをやらないとゾンビプロセスが残ります。
setsid()
は必要ないみたい。
gitのプロセス問題は、孫プロセスとは別の話っぽいですね。gidを受け継いでないですし。
これでは削除できないのは当たり前。
from vimproc.vim.
原因判明しました。どうやら、vimprocの"&&"の処理がバグっているようです。
Edit: あれれ、しかし他のコマンドでは再現しないぞ。うーん。
from vimproc.vim.
修正完了しました。
from vimproc.vim.
git の件は、関数に notty
のようなオプションを用意して子プロセス側の端末を捨てれば、プロンプト出さずに終了すると思います。
以下のような感じです。
vp_pipe_open()
内、子プロセス側で
char name[L_ctermid];
if (notty) {
if (ctermid(name)[0] != '\0') {
int tfd;
if ((tfd = open(name, O_RDONLY)) != -1) {
ioctl(tfd, TIOCNOTTY, NULL);
close(tfd);
}
}
}
from vimproc.vim.
修正しました。
from vimproc.vim.
Related Issues (20)
- can not build vimproc's native extensions HOT 2
- Is there any way to highlight the line or line number the error is on? HOT 1
- Support passing Environment Variables to subprocesses HOT 2
- Windows binaries out of date? HOT 3
- Appveyor build is failed HOT 1
- vimproc#system works but vimproc#system_bg doesn't on Windows 10 HOT 3
- Get the version of vimproc via vim script. HOT 4
- Checking vimproc in BSD HOT 1
- faulty cygwin detection HOT 2
- How can I apply a parameter when use vimproc? HOT 2
- try to upgrade do make[1]: Nothing to be done for `all' HOT 1
- async stdout/stdin support HOT 3
- Code signature not valid for use in process HOT 10
- [Question] How to work with an interactive process? HOT 2
- Suggestion: Add Cygwin64 environment
- Would it be possible to use vim job to replace compiled dll? HOT 2
- MacOS 10.14.6 install/build error HOT 1
- Need Help From Beginner HOT 4
- Why not implement one .bat which can build this plugin with msvc toolchain? HOT 3
- (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/usr/lib/vimproc_mac.so' (no such file)" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vimproc.vim.