straceutil

package
v0.0.0-...-3a98d3a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2025 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package straceutil provides utilities for strace.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available(ctx context.Context) bool

Available returns whether strace is available or not.

Types

type Strace

type Strace struct {
	// contains filtered or unexported fields
}

Strace represents a cmd traced by strace.

func New

func New(ctx context.Context, id string, cmd *exec.Cmd) *Strace

New creates a new Strace for cmd.

func (*Strace) Close

func (s *Strace) Close(ctx context.Context)

Close closes the strace cmd.

func (*Strace) Cmd

func (s *Strace) Cmd(ctx context.Context) *exec.Cmd

Cmd returns cmd to run under strace.

func (*Strace) PostProcess

func (s *Strace) PostProcess(ctx context.Context) (inputs, outputs []string, err error)

PostProcess processes strace outputs and returns inputs/outputs accessed by the cmd. inputs/outputs will be absolute paths or relatives to the working directory of the cmd.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL