mirror of
https://github.com/lxc/incus
synced 2026-08-02 05:26:46 +00:00
shared/subprocess/manager: Removes redundant error return value from NewProcessWithFds
It was always nil. Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
This commit is contained in:
parent
ec1334d370
commit
47b3a00470
@ -32,18 +32,14 @@ func NewProcess(name string, args []string, stdoutPath string, stderrPath string
|
||||
}
|
||||
}
|
||||
|
||||
p, err := NewProcessWithFds(name, args, nil, stdout, stderr)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Error when creating process object: %w", err)
|
||||
}
|
||||
|
||||
p := NewProcessWithFds(name, args, nil, stdout, stderr)
|
||||
p.closeFds = true
|
||||
|
||||
return p, nil
|
||||
}
|
||||
|
||||
// NewProcessWithFds is a constructor for a process object. Represents a process with argument config. Returns an address to process.
|
||||
func NewProcessWithFds(name string, args []string, stdin io.ReadCloser, stdout io.WriteCloser, stderr io.WriteCloser) (*Process, error) {
|
||||
func NewProcessWithFds(name string, args []string, stdin io.ReadCloser, stdout io.WriteCloser, stderr io.WriteCloser) *Process {
|
||||
proc := Process{
|
||||
Name: name,
|
||||
Args: args,
|
||||
@ -52,7 +48,7 @@ func NewProcessWithFds(name string, args []string, stdin io.ReadCloser, stdout i
|
||||
Stderr: stderr,
|
||||
}
|
||||
|
||||
return &proc, nil
|
||||
return &proc
|
||||
}
|
||||
|
||||
// ImportProcess imports a saved process into a subprocess object.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user