Conversation
Currently `Debug` only prints the raw value:
ExitStatus(
unix_wait_status(
139,
),
)
That isn't very meaningful on its own since you may have to manually
decode the value to understand what happened. Change the implementation
to look more structural:
ExitStatus(
unix_wait_status {
value: 139,
status: Signaled { signal: 11, name: SIGSEGV, core_dumped: true },
},
)
This is a bit more similar to the information available via `Display`:
signal: 11 (SIGSEGV) (core dumped)
|
r? @aapoalas rustbot has assigned @aapoalas. Use Why was this reviewer chosen?The reviewer was selected based on:
|
| "signal: 15 (SIGTERM)", | ||
| "ExitStatus(unix_wait_status { \ | ||
| value: 15, \ | ||
| status: Signaled { signal: 15, name: SIGTERM, core_dumped: false } \ |
There was a problem hiding this comment.
Any reason to be this verbose? Maybe we should just Debug as Display + the raw status code?
There was a problem hiding this comment.
As in something like this?
ExitStatus(
unix_wait_status {
value: 139,
message: "signal: 11 (SIGSEGV) (core dumped)"
},
)
I think I have a mild preference for what's in the PR currently since it looks more like other Debug impls and doesn't use all that many more characters than the string (I made it intentionally not wrap with pretty printing). I don't feel especially strongly though.
There was a problem hiding this comment.
I was thinking something even shorter, e.g., "signal: 11 (SIGSEGV) (core dumped) (code: 139)"
Currently
Debugonly prints the raw value:That isn't very meaningful on its own since you may have to manually decode the value to understand what happened. Change the implementation to look more structural:
This is a bit more similar to the information available via
Display: