You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ms...@apache.org on 2019/01/21 22:30:17 UTC

[incubator-openwhisk-runtime-swift] branch master updated: flush stdout stderr before sending result/signal over descriptor 3 (#91)

This is an automated email from the ASF dual-hosted git repository.

msciabarra pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-swift.git


The following commit(s) were added to refs/heads/master by this push:
     new 5bb0409  flush stdout stderr before sending result/signal over descriptor 3 (#91)
5bb0409 is described below

commit 5bb040988330ab6288b595f198ea1a5a786409ac
Author: Carlos Santana <cs...@apache.org>
AuthorDate: Mon Jan 21 17:30:13 2019 -0500

    flush stdout stderr before sending result/signal over descriptor 3 (#91)
---
 core/swift42Action/swiftbuild.py.launcher.swift | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/swift42Action/swiftbuild.py.launcher.swift b/core/swift42Action/swiftbuild.py.launcher.swift
index bf6b65d..a1a2cf0 100644
--- a/core/swift42Action/swiftbuild.py.launcher.swift
+++ b/core/swift42Action/swiftbuild.py.launcher.swift
@@ -37,9 +37,9 @@ func _whisk_print_result(jsonData: Data){
 func _whisk_print_buffer(jsonString: String){
     var buf : [UInt8] = Array(jsonString.utf8)
     buf.append(10)
-    write(3, buf, buf.count)
     fflush(stdout)
     fflush(stderr)
+    write(3, buf, buf.count)
 }
 
 // snippet of code "injected" (wrapper code for invoking traditional main)