From dev-return-1368-archive-asf-public=cust-asf.ponee.io@openwhisk.apache.org Fri Jan 26 18:23:04 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 37274180676 for ; Fri, 26 Jan 2018 18:23:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 27523160C20; Fri, 26 Jan 2018 17:23:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 71C16160C50 for ; Fri, 26 Jan 2018 18:23:03 +0100 (CET) Received: (qmail 68009 invoked by uid 500); 26 Jan 2018 17:23:02 -0000 Mailing-List: contact dev-help@openwhisk.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openwhisk.apache.org Delivered-To: mailing list dev@openwhisk.apache.org Received: (qmail 67885 invoked by uid 99); 26 Jan 2018 17:23:02 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Jan 2018 17:23:02 +0000 From: GitBox To: dev@openwhisk.apache.org Subject: [GitHub] jthomas commented on a change in pull request #3: support large arguments Message-ID: <151698738200.12428.12412966860405529325.gitbox@gitbox.apache.org> jthomas commented on a change in pull request #3: support large arguments URL: https://github.com/apache/incubator-openwhisk-runtime-docker/pull/3#discussion_r164169939 ########## File path: core/actionProxy/actionproxy.py ########## @@ -127,18 +127,29 @@ def error(msg): try: input = json.dumps(args) - p = subprocess.Popen( - [self.binary, input], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - env=env) + if len(input) > 131071: # MAX_ARG_STRLEN (131071) linux/binfmts.h + # pass argument via stdin + p = subprocess.Popen( + [self.binary], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + env=env) + else: + # pass argument via stdin and command parameter Review comment: I agree with this. `stdin` should be the default. Input can be passed as an argument as well but not if it's larger than 128K. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services