File tree Expand file tree Collapse file tree 2 files changed +0
-23
lines changed Expand file tree Collapse file tree 2 files changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -296,19 +296,6 @@ func (e *escort) runBin() {
296296}
297297
298298func (e * escort ) cleanOldBin () {
299- defer func () {
300- if e .stdoutPipe != nil {
301- if err := e .stdoutPipe .Close (); err != nil {
302- log .Printf ("Failed to close stdout pipe: %v" , err )
303- }
304- }
305- if e .stderrPipe != nil {
306- if err := e .stderrPipe .Close (); err != nil {
307- log .Printf ("Failed to close stderr pipe: %v" , err )
308- }
309- }
310- }()
311-
312299 pid := e .bin .Process .Pid
313300 log .Println ("Killing old pid" , pid )
314301
Original file line number Diff line number Diff line change @@ -37,11 +37,6 @@ func runCmd(cmd *exec.Cmd) (err error) {
3737 if stderr , err = cmd .StderrPipe (); err != nil {
3838 return fmt .Errorf ("stderr pipe: %w" , err )
3939 }
40- defer func () {
41- if cerr := stderr .Close (); cerr != nil {
42- fmt .Fprintf (os .Stderr , "close stderr pipe: %v" , cerr )
43- }
44- }()
4540 go func () {
4641 if _ , cErr := io .Copy (os .Stderr , stderr ); cErr != nil {
4742 fmt .Fprintf (os .Stderr , "copy stderr: %v" , cErr )
@@ -51,11 +46,6 @@ func runCmd(cmd *exec.Cmd) (err error) {
5146 if stdout , err = cmd .StdoutPipe (); err != nil {
5247 return fmt .Errorf ("stdout pipe: %w" , err )
5348 }
54- defer func () {
55- if cerr := stdout .Close (); cerr != nil {
56- fmt .Fprintf (os .Stderr , "close stdout pipe: %v" , cerr )
57- }
58- }()
5949 go func () {
6050 if _ , cErr := io .Copy (os .Stdout , stdout ); cErr != nil {
6151 fmt .Fprintf (os .Stderr , "copy stdout: %v" , cErr )
You can’t perform that action at this time.
0 commit comments