Closed beckerg closed 3 months ago
A PR is good. Thanks for finding the problem! The use of "(inactive)" vs "(null)" is kind of a shrug on my end, but I can see how it's a bit nicer to interpret. There's another use of execSlave
on line 2346 that should get modified as well, if you stick with the change.
Great! Thanks for pointing out the issue at line 2346, addressed it in my PR.
Yeah, I like "(inactive)" or "(down)" or some such a bit better, gives me confidence that it was intentional.
PR merged.
For entries that exec a process with ondemand semantics such as the following:
console-x prints "(null)" because pCE->execSlave is NULL:
When the console is opened the correct pty device is shown. However, once the console is closes it continues to show the pty device which is no longer in use.
The following simple patch fixes this problem, although what to print when the console is inactive is debatable (e.g., I could see the new parens potentially causing grief for someone trying to machine parse the output):
With the above patch and console freenas1-bmc open we see the following:
When the freenas1-bmc console is closed the entry returns to "(inactive)".
This was tested on:
I can generate a merge request if this is acceptable, just not sure what the process is for this project. Thoughts?