Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
cli: close communication channel with the parent
Browse files Browse the repository at this point in the history
In order to avoid file descriptor leaks, the communication channel with the
parent must be closed.

Signed-off-by: Julio Montes <julio.montes@intel.com>
  • Loading branch information
Julio Montes committed Oct 25, 2018
1 parent d6e5754 commit cf39256
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

package main

/*
#cgo CFLAGS: -Wall
extern int close_channels(void);
*/
import "C"

import (
"context"
"errors"
Expand Down Expand Up @@ -386,6 +392,8 @@ func afterSubcommands(c *cli.Context) error {

stopTracing(ctx)

C.close_channels()

return nil
}

Expand Down

0 comments on commit cf39256

Please sign in to comment.