camerondurham / codecanvas

Remote code executor server, frontend, and CLI to run untrusted code as a non-root user in a Docker container.

Home Page:https://u64.cam/codecanvas

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Engine: implement timeout with Go instead of external program

camerondurham opened this issue · comments

commented

Currently, the runner uses the Linux timeout (from the coreutils homebrew formula on macOS) command to execute commands with a timeout.

This is to improve execution by using multiple channels and select to implement the timeout in Go. See gobyexample/timeouts for an example.

Acceptance Criteria (in progress):

  • run command with configurable X second timeout
    • look at other options to implement timeout in Go
    • explore if we can use select with exec.Command instead of the timeout external process
    • test functionality in unit tests