Skip to content
Snippets Groups Projects

Try to solve #4

Closed Kamil Trzcińśki requested to merge chroot-path into master
1 unresolved thread

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
159 159
160 160 // Update command to use chroot
161 161 cmd.SysProcAttr.Chroot = wd
162 cmd.Path = temporaryExecutable.Name()
162 cmd.Path = "/" + temporaryExecutable.Name()
  • @ayufan the documentation for os/exec states:

    If Path is relative, it is evaluated relative to Dir.

    https://golang.org/pkg/os/exec/#Cmd

    Since we're setting Dir to /, I don't see how this change will make any difference to the user.

    Most likely is that the executable isn't being written - it seems we swallow the error when this doesn't happen. I'll close this MR and fix that problem separately; it should get us closer to fixing #4 (closed)

  • Please register or sign in to reply
  • closed

  • Please register or sign in to reply
    Loading