(s string, args []string)
| 141 | } |
| 142 | |
| 143 | func shellCommand(s string, args []string) *exec.Cmd { |
| 144 | if len(gOpts.ifs) != 0 { |
| 145 | s = fmt.Sprintf("IFS='%s'; %s", gOpts.ifs, s) |
| 146 | } |
| 147 | |
| 148 | args = append([]string{gOpts.shellflag, s, "--"}, args...) |
| 149 | |
| 150 | args = append(gOpts.shellopts, args...) |
| 151 | |
| 152 | return exec.Command(gOpts.shell, args...) |
| 153 | } |
| 154 | |
| 155 | func shellSetPG(cmd *exec.Cmd) { |
| 156 | cmd.SysProcAttr = &unix.SysProcAttr{Setpgid: true} |