Re: callback is not called when job exit immediately.

2016-09-04 Thread Bram Moolenaar
Yasuhiro Matsumoto wrote: > When the job exit immediately, channel->ch_to_be_closed will be TRUE > before channel_read even though the output buffer is filled enough to > read. For example, following command doesn't output result of the job. > > - > function! Disp(ch, msg) > echom a:

Re: callback is not called when job exit immediately.

2016-09-04 Thread mattn
On Sunday, September 4, 2016 at 11:19:35 PM UTC+9, Bram Moolenaar wrote: > Yasuhiro Matsumoto wrote: > > > When the job exit immediately, channel->ch_to_be_closed will be TRUE > > before channel_read even though the output buffer is filled enough to > > read. For example, following command doesn't

Re: callback is not called when job exit immediately.

2016-09-04 Thread mattn
Additional, I could reproduce this on Linux. http://go-gyazo.appspot.com/d1ac2f988bba9549.png -- -- 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 r

Re: callback is not called when job exit immediately.

2016-09-04 Thread Bram Moolenaar
Yasuhiro Matsumoto wrote: > On Sunday, September 4, 2016 at 11:19:35 PM UTC+9, Bram Moolenaar wrote: > > Yasuhiro Matsumoto wrote: > > > > > When the job exit immediately, channel->ch_to_be_closed will be TRUE > > > before channel_read even though the output buffer is filled enough to > > > read

Re: callback is not called when job exit immediately.

2016-09-04 Thread mattn
> Isn't the best solution then to have channel_wait() not return an error? > Or is there some way to detect the situation, perhaps by using > LastError(). At least it should only affect Windows, since on Unix we > don't want to make this exception. I say again, This is posssible to be reproduced

Re: callback is not called when job exit immediately.

2016-09-04 Thread mattn
On Monday, September 5, 2016 at 11:30:42 AM UTC+9, mattn wrote: > > Isn't the best solution then to have channel_wait() not return an error? > > Or is there some way to detect the situation, perhaps by using > > LastError(). At least it should only affect Windows, since on Unix we > > don't want t

Re: callback is not called when job exit immediately.

2016-09-04 Thread mattn
behavior is I expected. but tests are failing with my patch. >From test_channel.vim: Found errors in Test_out_close_cb(): function RunTheTest[9]..Test_out_close_cb line 26: Expected 2 but got 0 Found errors in Test_pipe_to_buffer_name(): function RunTheTest[9]..Test_pipe_to_buffer_name[1]..Run_tes

Re: callback is not called when job exit immediately.

2016-09-05 Thread mattn
Below's change fixes this issue, and not break tests. https://gist.github.com/214b61186e2fe091fa65e2b6fbaa8069 Thanks. -- -- 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.or

Re: callback is not called when job exit immediately.

2016-09-05 Thread mattn
On Tuesday, September 6, 2016 at 12:01:35 AM UTC+9, mattn wrote: > Below's change fixes this issue, and not break tests. > > https://gist.github.com/214b61186e2fe091fa65e2b6fbaa8069 > > Thanks. Ah, sorry noisy. Still wrong... -- -- You received this message from the "vim_dev" maillist. Do not

Re: callback is not called when job exit immediately.

2016-09-05 Thread Bram Moolenaar
Yasuhiro Matsumoto wrote: > > Isn't the best solution then to have channel_wait() not return an error? > > Or is there some way to detect the situation, perhaps by using > > LastError(). At least it should only affect Windows, since on Unix we > > don't want to make this exception. > > I say ag

Re: callback is not called when job exit immediately.

2016-09-05 Thread Bram Moolenaar
Yasuhiro Matsumoto wrote: > On Monday, September 5, 2016 at 11:30:42 AM UTC+9, mattn wrote: > > > Isn't the best solution then to have channel_wait() not return an error? > > > Or is there some way to detect the situation, perhaps by using > > > LastError(). At least it should only affect Window

Re: callback is not called when job exit immediately.

2016-09-05 Thread Bram Moolenaar
Yasuhiro Matsumoto wrote: > behavior is I expected. but tests are failing with my patch. > > From test_channel.vim: > Found errors in Test_out_close_cb(): > function RunTheTest[9]..Test_out_close_cb line 26: Expected 2 but got 0 > Found errors in Test_pipe_to_buffer_name(): > function RunTheTest

Re: callback is not called when job exit immediately.

2016-09-08 Thread Bram Moolenaar
I wrote: > Yasuhiro Matsumoto wrote: > > > behavior is I expected. but tests are failing with my patch. > > > > From test_channel.vim: > > Found errors in Test_out_close_cb(): > > function RunTheTest[9]..Test_out_close_cb line 26: Expected 2 but got 0 > > Found errors in Test_pipe_to_buffer_nam

Re: callback is not called when job exit immediately.

2016-09-08 Thread mattn
okay, will look into it soon. -- -- 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 Gro

Re: callback is not called when job exit immediately.

2016-09-09 Thread mattn
On Friday, September 9, 2016 at 9:52:09 AM UTC+9, mattn wrote: > okay, will look into it soon. I tried this but I cound't reproduce this. hmm, seems to be fixed already? -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replyin