14360: Merge branch 'master'
authorTom Clegg <tclegg@veritasgenetics.com>
Thu, 15 Nov 2018 21:24:48 +0000 (16:24 -0500)
committerTom Clegg <tclegg@veritasgenetics.com>
Thu, 15 Nov 2018 21:24:48 +0000 (16:24 -0500)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg@veritasgenetics.com>

1  2 
build/run-tests.sh
sdk/go/arvados/container.go
services/crunch-run/crunchrun.go
vendor/vendor.json

Simple merge
Simple merge
index 27fb8367f50e05764d45c77dc362497f7f702847,e5a1b94706c781cdc62e805e972c5f46ac0bba24..1c6c58009fac71bd5fa5015a4922821937e61d5a
@@@ -1730,30 -1742,9 +1746,31 @@@ func main() 
        `)
        memprofile := flag.String("memprofile", "", "write memory profile to `file` after running container")
        getVersion := flag.Bool("version", false, "Print version information and exit.")
-       checkContainerd := flag.Duration("check-containerd", 60*time.Second, "Periodic check if (docker-)containerd is running (use 0s to disable).")
+       flag.Duration("check-containerd", 0, "Ignored. Exists for compatibility with older versions.")
 +
 +      detached := false
 +      if len(os.Args) > 1 && os.Args[1] == "-detached" {
 +              // This process was invoked by a parent process, which
 +              // has passed along its own arguments, including
 +              // -detach, after the leading -detached flag.  Strip
 +              // the leading -detached flag (it's not recognized by
 +              // flag.Parse()) ... and remember not to detach all
 +              // over again in this process.
 +              os.Args = append([]string{os.Args[0]}, os.Args[2:]...)
 +              detached = true
 +      }
++
        flag.Parse()
  
 +      switch {
 +      case *detach && !detached:
 +              os.Exit(Detach(flag.Arg(0), os.Args, os.Stdout, os.Stderr))
 +      case *kill >= 0:
 +              os.Exit(KillProcess(flag.Arg(0), syscall.Signal(*kill), os.Stdout, os.Stderr))
 +      case *list:
 +              os.Exit(ListProcesses(os.Stdout, os.Stderr))
 +      }
 +
        // Print version information if requested
        if *getVersion {
                fmt.Printf("crunch-run %s\n", version)
Simple merge