Show when bazel run exited with code#827
Conversation
|
Well, the CI has shown the tests, and that there's no SIGCHLD on Windows. I guess the next solution is to spawn a thread that waits on the |
9dc2b16 to
ce9492b
Compare
|
Ok now a goroutine is responsible for waiting, so it can't be done elsewhere: command structs gain two sync vars to report back, one atomic bool for whether it's running, and a channel to deal with the terminate timeout. Bazel struct loses its Wait as it wasn't called anywhere, and I believe it's not exported into a library. |
|
Looks like a good start. Could you add some end to end tests to cover this new behavior so we don't accidentally regress it? |
b727320 to
be43541
Compare
|
@achew22 You're right, here's the e2e test. However there's a data race I cannot get rid of. My guess it that the waiting goroutine from another test is still running when a new test starts. I've tried to ensure that the goroutine won't cross test boundaries (eg. calling |
Hi,
As I'm using ibazel to develop and run a short-lived binary, I though it'd be good to have ibazel show when the binary has exited. A message "Starting..." is displayed at the beginning, this PR adds a message "Exited (code)" at the end.
I'm a bit frustrated that the OS can't tell exactly which child has exited, but AFAIK when there's a
Commandno otherCmdis spawned.I have no idea how to write tests for that... and I hope it won't catch grandchildren.