Browse code

Add docstring to reexec.Command

Signed-off-by: Alexander Morozov <lk4d4@docker.com>

Alexander Morozov authored on 2015/07/21 02:16:37
Showing 3 changed files
... ...
@@ -7,6 +7,10 @@ import (
7 7
 	"syscall"
8 8
 )
9 9
 
10
+// Command returns *exec.Cmd which have Path as current binary. Also it setting
11
+// SysProcAttr.Pdeathsig to SIGTERM.
12
+// For example if current binary is "docker" at "/usr/bin", then cmd.Path will
13
+// be set to "/usr/bin/docker".
10 14
 func Command(args ...string) *exec.Cmd {
11 15
 	return &exec.Cmd{
12 16
 		Path: Self(),
... ...
@@ -6,6 +6,7 @@ import (
6 6
 	"os/exec"
7 7
 )
8 8
 
9
+// Command is unsupported on operating systems apart from Linux and Windows.
9 10
 func Command(args ...string) *exec.Cmd {
10 11
 	return nil
11 12
 }
... ...
@@ -6,6 +6,9 @@ import (
6 6
 	"os/exec"
7 7
 )
8 8
 
9
+// Command returns *exec.Cmd which have Path as current binary.
10
+// For example if current binary is "docker.exe" at "C:\", then cmd.Path will
11
+// be set to "C:\docker.exe".
9 12
 func Command(args ...string) *exec.Cmd {
10 13
 	return &exec.Cmd{
11 14
 		Path: Self(),