unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Mathias Dahl <mathias.dahl@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: call-process having problems with a big total length of arguments	under Windows
Date: Sun, 10 Mar 2013 18:21:52 +0200	[thread overview]
Message-ID: <83ppz7w7hb.fsf@gnu.org> (raw)
In-Reply-To: <CABrcCQ6GoAuO=Nr0Lzh6kMfjd03P21HOSroXfXx_GteKgS_BYA@mail.gmail.com>

> From: Mathias Dahl <mathias.dahl@gmail.com>
> Date: Sun, 10 Mar 2013 14:19:54 +0100
> 
> 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?

The API used to invoke subprocesses on MS-Windows imposes a hard limit
of 32KB on the length of the command line passed to the subprocess.
This length includes all the arguments your Lisp program conses, plus
the blank characters that delimit each argument from the next.  Does
this explain what you see?



      reply	other threads:[~2013-03-10 16:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-10 13:02 call-process having problems with a big total length of arguments under Windows Mathias Dahl
2013-03-10 13:19 ` Mathias Dahl
2013-03-10 16:21   ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83ppz7w7hb.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=mathias.dahl@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).