phoerious commented on a change in pull request #16658:
URL: https://github.com/apache/beam/pull/16658#discussion_r811368107



##########
File path: sdks/python/container/boot.go
##########
@@ -210,15 +231,62 @@ func main() {
        wg.Add(len(workerIds))
        for _, workerId := range workerIds {
                go func(workerId string) {
-                       log.Printf("Executing: python %v", strings.Join(args, " 
"))
-                       log.Fatalf("Python exited: %v", 
execx.ExecuteEnv(map[string]string{"WORKER_ID": workerId}, "python", args...))
-                       wg.Done()
+                       defer wg.Done()
+                       log.Printf("Executing Python (worker %v): python %v", 
workerId, strings.Join(args, " "))
+
+                       // Run Python command in new process group
+                       cmd := StartCommandEnv(map[string]string{"WORKER_ID": 
workerId}, "python", args...)
+                       childPids = append(childPids, cmd.Process.Pid)

Review comment:
       Note to myself: make this thread-safe.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to