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

How to determine if a process signaled (crashed)? #49

Open
AlexDenisov opened this issue Dec 26, 2020 · 1 comment
Open

How to determine if a process signaled (crashed)? #49

AlexDenisov opened this issue Dec 26, 2020 · 1 comment

Comments

@AlexDenisov
Copy link

Hi @DaanDeMeyer,

First of all, thanks a lot for the great library!
I'm trying to migrate from my own half-baked implementation to your library and it feels much much better than anything I could've implemented myself!

There is one thing I cannot figure out yet. Is there an API to determine whether a child process signaled or not?
Currently, I can only see the exit status, but it is not very helpful since value 134 could mean either exit(134) or abort().

I would appreciate any hints on the subject.

Cheers,
Alex.

@DaanDeMeyer
Copy link
Owner

DaanDeMeyer commented Dec 26, 2020

reproc follows bash here so unfortunately, there isn't yet a way to determine whether a process exited because of a signal or normally.

It shouldn't be too hard to add though. We can store an extra property telling whether the process exited with a signal or not and expose it via a new function reproc_signalled(). I'd happily review a PR for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants