mirror of
https://github.com/go-delve/delve.git
synced 2025-10-28 20:53:42 +08:00
proc,terminal: Ensure correct exit status (#2543)
Ensure that any command executed after the process we are trying to debug prints a correct and consistent exit status. Previously the exit code was being lost after the first time we printed that a process has exited. Additionally, certain commands would print the PID of the process and other would not. This change makes everything more correct and consistent.
This commit is contained in:
@ -26,6 +26,10 @@ type Process interface {
|
||||
// the `proc` package.
|
||||
// This is temporary and in support of an ongoing refactor.
|
||||
type ProcessInternal interface {
|
||||
// Valid returns true if this Process can be used. When it returns false it
|
||||
// also returns an error describing why the Process is invalid (either
|
||||
// ErrProcessExited or ErrProcessDetached).
|
||||
Valid() (bool, error)
|
||||
// Restart restarts the recording from the specified position, or from the
|
||||
// last checkpoint if pos == "".
|
||||
// If pos starts with 'c' it's a checkpoint ID, otherwise it's an event
|
||||
@ -87,10 +91,6 @@ type Info interface {
|
||||
// ResumeNotify specifies a channel that will be closed the next time
|
||||
// ContinueOnce finishes resuming the target.
|
||||
ResumeNotify(chan<- struct{})
|
||||
// Valid returns true if this Process can be used. When it returns false it
|
||||
// also returns an error describing why the Process is invalid (either
|
||||
// ErrProcessExited or ErrProcessDetached).
|
||||
Valid() (bool, error)
|
||||
BinInfo() *BinaryInfo
|
||||
EntryPoint() (uint64, error)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user