Re: [patch] fix #1155 (A job cannot be stopped right after being started)

2016-10-17 Fir de Conversatie Ozaki Kiichi
> Seems like a reasonable solution.  So the test fails for the current
> Vim?  Or does it fail sometimes?

Sometimes. Especially, according to travis-ci, it is highly probable to fail on
Mac; about half or more.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [patch] fix #1155 (A job cannot be stopped right after being started)

2016-10-17 Fir de Conversatie Bram Moolenaar

Ozaki Kiichi wrote:

> The following will fix #1155.
> 
> https://gist.github.com/ichizok/26d571401be0685267ebf0790e964903
> 
> [cause of problem]
> 
> This problem may occur on some *nix environment.
> 
> Calling job_stop immediately after job_start, child process may receive signal
> before reset_signals().
> Therefore deadly-signals (except SIGKILL) are trapped by deathtrap() and so
> can't terminate child process. Child remains as vim process image.
> 
> [solution proposal]
> 
> * Blocking deadly-signals by sigprocmask() before fork();
> parent process (or fork-error) unblocks them promptly, and child process
> does after reset_signals().
> 
> We need check sigprocmask availablity.

Seems like a reasonable solution.  So the test fails for the current
Vim?  Or does it fail sometimes?

-- 
Snoring is prohibited unless all bedroom windows are closed and securely
locked.
[real standing law in Massachusetts, United States of America]

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[patch] fix #1155 (A job cannot be stopped right after being started)

2016-10-17 Fir de Conversatie Ozaki Kiichi
Hi.

The following will fix #1155.

https://gist.github.com/ichizok/26d571401be0685267ebf0790e964903

[cause of problem]

This problem may occur on some *nix environment.

Calling job_stop immediately after job_start, child process may receive signal
before reset_signals().
Therefore deadly-signals (except SIGKILL) are trapped by deathtrap() and so
can't terminate child process. Child remains as vim process image.

[solution proposal]

* Blocking deadly-signals by sigprocmask() before fork();
parent process (or fork-error) unblocks them promptly, and child process
does after reset_signals().

We need check sigprocmask availablity.

Thank you.
- Ozaki Kiichi

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.