[ARVADOS] created: 97c2c0f4809ec2541693f9b38834cc031bbeee3e

git at public.curoverse.com git at public.curoverse.com
Thu Aug 28 13:17:12 EDT 2014


        at  97c2c0f4809ec2541693f9b38834cc031bbeee3e (commit)


commit 97c2c0f4809ec2541693f9b38834cc031bbeee3e
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Aug 28 13:16:59 2014 -0400

    3751: Pass stdin to child process.

diff --git a/services/crunchstat/crunchstat.go b/services/crunchstat/crunchstat.go
index d61871d..6eae22c 100644
--- a/services/crunchstat/crunchstat.go
+++ b/services/crunchstat/crunchstat.go
@@ -262,6 +262,10 @@ func main() {
 
 		logger.Print("Running ", flag.Args())
 
+		// Child process will read from our stdin pipe (we
+		// close our copy below)
+		cmd.Stdin = os.Stdin
+
 		// Forward SIGINT and SIGTERM to inner process
 		term := make(chan os.Signal, 1)
 		go func(sig <-chan os.Signal) {
@@ -293,6 +297,9 @@ func main() {
 		}
 	}
 
+	// Close standard input in this (parent) process
+	os.Stdin.Close()
+
 	// Read the cid file
 	var container_id string
 	if cgroup_cidfile != "" {

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list