Re: [notmuch] Bulk message tagging

Subject: Re: [notmuch] Bulk message tagging

Date: Sat, 17 Apr 2010 08:43:19 -0700

To: Jesse Rosenthal, Xavier Maillard, Mark Anderson, notmuch@notmuchmail.org

Cc:

From: Carl Worth


On Fri, 16 Apr 2010 07:47:45 -0400, Jesse Rosenthal <jrosenthal@jhu.edu> wrote:
> I've never run into this error.

I usually run into this with things like "rm * */*" or so.

> Is there a specific length that triggers
> it? If so, we could chunk the tagging command. Or does the max length
> depend on the machine and system?

It is system dependent. Here are a couple of things I found:

From "man errno":

	E2BIG           Argument list too long (POSIX.1)

and from "man sysconf":

      ARG_MAX - _SC_ARG_MAX
              The  maximum  length  of  the arguments to the exec(3) family of
              functions.  Must not be less than _POSIX_ARG_MAX (4096).

So one could query with sysconf and break things up into multiple
commands as needed.

In fact, until we have some sort of daemon that we can feed
arbitrarily-long lists to, that's what we should do.

-Carl

part-000.sig (application/pgp-signature)

Thread: