Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting exit status from job with job-control #1795

Closed
benekastah opened this issue Jan 11, 2015 · 4 comments
Closed

Getting exit status from job with job-control #1795

benekastah opened this issue Jan 11, 2015 · 4 comments
Labels
enhancement feature request

Comments

@benekastah
Copy link

I could be wrong about this, but it doesn't seem possible to get the exit status from a job with job-control. This seems like a pretty major limitation. Is there a reason for this? It would be nice to have either a function jobstatus() or have v:job_data[2] be the exit status when v:job_data[1] is 'exit'. Thoughts?

PS I apologize if this has been discussed before. I didn't find a previous discussion on it.

@justinmk
Copy link
Member

I believe it is planned. Also getting the PID.

@tarruda
Copy link
Member

tarruda commented Jan 12, 2015

I could be wrong about this, but it doesn't seem possible to get the exit status from a job with job-control. This seems like a pretty major limitation. Is there a reason for this? It would be nice to have either a function jobstatus() or have v:job_data[2] be the exit status when v:job_data[1] is 'exit'. Thoughts?

PS I apologize if this has been discussed before. I didn't find a previous discussion on it.

It was discussed having a blocking function that waits until a list of jobs has exited, and returns a list of status codes, but I think it would be cleaner having the status being passed in v:job_data[2] as you suggested. This should be easy to implement.

@justinmk justinmk added the enhancement feature request label Jan 14, 2015
@benekastah
Copy link
Author

If this is good for a first-time contributor to tackle, I'd be happy to take it on myself. Let me know if there's any reason why I shouldn't.

benekastah pushed a commit to benekastah/neovim that referenced this issue Jan 19, 2015
Fixes neovim#1795 by making v:job_data[2] be the exit status when the
"activity" is "exit".
benekastah pushed a commit to benekastah/neovim that referenced this issue Jan 26, 2015
Fixes neovim#1795 by making v:job_data[2] be the exit status when the
"activity" is "exit".

Added test for non-zero job statuses and fixed another test

Test error codes up to 255
benekastah pushed a commit to benekastah/neovim that referenced this issue Jan 26, 2015
Fixes neovim#1795 by making v:job_data[2] be the exit status when the
"activity" is "exit".

Added test for non-zero job statuses and fixed another test

Test error codes up to 255
benekastah pushed a commit to benekastah/neovim that referenced this issue Feb 8, 2015
Fixes neovim#1795 by making v:job_data[2] be the exit status when the
"activity" is "exit".

Added test for non-zero job statuses and fixed another test

Test error codes up to 255
benekastah pushed a commit to benekastah/neovim that referenced this issue Feb 8, 2015
Fixes neovim#1795 by making v:job_data[2] be the exit status when the
"activity" is "exit".

Added test for non-zero job statuses and fixed another test

Test error codes up to 255
@ghost
Copy link

ghost commented Apr 20, 2015

Fairly certain this was fixed a while ago, hence #1954 being closed, so I'll close this as well.

@ghost ghost closed this as completed Apr 20, 2015
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature request
Projects
None yet
3 participants