하위 프로세스에 환경변수 전달
This commit is contained in:
@ -413,7 +413,7 @@ func (hc *houstonClient) launch(meta *procmeta) error {
|
|||||||
go stdReader(meta.name, stdout, index)
|
go stdReader(meta.name, stdout, index)
|
||||||
|
|
||||||
logger.Println("startChildProcess :", meta.cmd.Args)
|
logger.Println("startChildProcess :", meta.cmd.Args)
|
||||||
meta.cmd.Env = append(meta.cmd.Env, fmt.Sprintf("HOUSTON_SIBLIING_INDEX=%d", index))
|
meta.cmd.Env = append(os.Environ(), fmt.Sprintf("HOUSTON_SIBLIING_INDEX=%d", index))
|
||||||
err = meta.cmd.Start()
|
err = meta.cmd.Start()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
logger.Println("process index, pid =", index, meta.cmd.Process.Pid)
|
logger.Println("process index, pid =", index, meta.cmd.Process.Pid)
|
||||||
@ -424,8 +424,6 @@ func (hc *houstonClient) launch(meta *procmeta) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
var errPrepareprocessLaunchFailed = errors.New("prepareProcessLaunch failed")
|
|
||||||
|
|
||||||
func (hc *houstonClient) startChildProcess(req *shared.StartProcessRequest, op protos.OperationClient) error {
|
func (hc *houstonClient) startChildProcess(req *shared.StartProcessRequest, op protos.OperationClient) error {
|
||||||
meta, err := prepareProcessLaunch(hc.config.StorageRoot, req)
|
meta, err := prepareProcessLaunch(hc.config.StorageRoot, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user