From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.devel Subject: Re: call-process having problems with a big total length of arguments under Windows Date: Sun, 10 Mar 2013 14:19:54 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1362921629 31652 80.91.229.3 (10 Mar 2013 13:20:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Mar 2013 13:20:29 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 10 14:20:43 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UEgB9-00082o-Ev for ged-emacs-devel@m.gmane.org; Sun, 10 Mar 2013 14:20:43 +0100 Original-Received: from localhost ([::1]:45834 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UEgAn-000647-BV for ged-emacs-devel@m.gmane.org; Sun, 10 Mar 2013 09:20:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UEgAj-00062b-Il for emacs-devel@gnu.org; Sun, 10 Mar 2013 09:20:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UEgAi-0002KJ-2W for emacs-devel@gnu.org; Sun, 10 Mar 2013 09:20:17 -0400 Original-Received: from mail-wg0-f48.google.com ([74.125.82.48]:35055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UEgAh-0002KB-SJ for emacs-devel@gnu.org; Sun, 10 Mar 2013 09:20:15 -0400 Original-Received: by mail-wg0-f48.google.com with SMTP id 16so3967230wgi.3 for ; Sun, 10 Mar 2013 06:20:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=nkVea1KXz5tDV9HKtOpG618aYZ9kWDRgNVawvIKSWY8=; b=rnQRJ4ogfriFOcX75ewSEuNx7g1GqtIe4pdqpEQy4Zv8jEubxI+0U0N2eNnD6y++YH JhXisfORbSlpMUCRXK+3wrSngOOirSEOz/vZVxyrP1k2VxdZHH51U2IXdmAzWRUMyVqi 0wj5rlEZdODHuj+eKLoTUdswos5P5vs7+ru1/q4fk7qm/lagtuI7CMZGNLSbn2R7X3b8 cHe4rxDZ9QScL5aPUTc2UWVm60xqyUuyelV73MK7re0JamOasILwatSOgS605ixT7qmg S8/i6hxiBE/2NOusW2BZ6owuf0uGw+CJNzc7XOe9qDrXHvvJjL941FDW+IcAr+bv+3RW XxbQ== X-Received: by 10.194.7.196 with SMTP id l4mr13746219wja.28.1362921615211; Sun, 10 Mar 2013 06:20:15 -0700 (PDT) Original-Received: by 10.194.0.133 with HTTP; Sun, 10 Mar 2013 06:19:54 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 74.125.82.48 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:157692 Archived-At: PS. I found a limit on the number of arguments I can use if the argument is one character: (apply 'call-process (append (list "ping" nil t nil) (make-list 16369 "1"))) Now, if I double the length of each argument I can get higher than 16369 characters in total: (apply 'call-process (append (list "ping" nil t nil) (make-list 10912 "12"))) So, it's not simply the total amount, but a combination of the number of arguments on the length of those arguments. Any ideas? On Sun, Mar 10, 2013 at 2:02 PM, Mathias Dahl wrote: > Under GNU/Linux I can do this (calling ping with an 10000 long argument list): > > (apply 'call-process > (append (list > "ping" > nil t nil) > (make-list 10000 "0123456789"))) > > (of course, ping complains about the syntax, but that is another > matter, ping is just an example of a command that exists on both > platforms where I test) > > On Windows (Windows 7, 64 bit) this works in a quite recent Emacs > (24.1.50.1 from last summer): > > (apply 'call-process > (append (list > "ping" > nil t nil) > (make-list 2000 "0123456789"))) > > But this does not (2000 is changed to 3000): > > (apply 'call-process > (append (list > "ping" > nil t nil) > (make-list 3000 "0123456789"))) > > I get (file-error "Spawning child process" "exec format error") when I > reach a certain amount of arguments. I can make it fail at fewer > arguments if I make the length of each argument longer. > > What sets the limit here? Is there a bug in Emacs on Windows or is it > a limitation of the OS? Is there is a known limitation in the total > length of all parameters? > > Thanks! > > /Mathias