Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to increase ARG_MAX?

1,302 views
Skip to first unread message

Stuart Hood

unread,
Jan 14, 1998, 3:00:00 AM1/14/98
to

On HP-UX A.09.05 9000/712, the ARG_MAX value is set
to 20478. i.e.

$ getconf ARG_MAX
20478

This doesn't appear in the kernel configurable
options using sam.

I have tried editing /etc/conf/h/param.h, changing
the value of NCARGS (I simply doubled it) and rebuilding
the kernel. This make no difference (after a reboot,
of course).

Does anyone know how to do this?

Thanks for any and all help,

Stuart.
-
--
Stuart Hood === IISC, Ceybank House, 22 City Rd, London, UK
Phone: + 44-0171 628 6960 Email: stu...@wingz.com
Fax : + 44-0171 638 7528 WWW: http://www.wingz.com
- Never let ignorance stand in the way of a good argument -

Frank Slootweg

unread,
Jan 14, 1998, 3:00:00 AM1/14/98
to

You can not change it, but perhaps you can explain why you want to
increase it (i.e. what are you trying to accomplish), so that we
perhaps can suggest alternative solutions (Hint: xargs(1)).

Stuart Hood

unread,
Jan 15, 1998, 3:00:00 AM1/15/98
to

Frank Slootweg (fra...@neth.hp.com) wrote:
: You can not change it, but perhaps you can explain why you want to

: increase it (i.e. what are you trying to accomplish), so that we
: perhaps can suggest alternative solutions (Hint: xargs(1)).

There are two places that I hit this problem.

One is an awk script that takes hundreds of files as
arguments - that I could rewrite. The other is a link
line that takes hundreds of object files - which I could
fix by changing the makefile.

I thought that increasing ARG_MAX would solve both
problems (and stop me hitting similar problems in
the future) and thus be quicker. It appears that
I was wrong ;-)

Is this the only Kernel ever written that doesn't allow
ARG_MAX to be changed?

Frank Slootweg

unread,
Jan 15, 1998, 3:00:00 AM1/15/98
to

Stuart Hood (stu...@iisc.co.uk) wrote:
[deleted]

> Is this the only Kernel ever written that doesn't allow
> ARG_MAX to be changed?

I do not know about other kernels, but in HP-UX 10.X (your question
was for a 9.X system), the limit is 2047998 bytes, i.e. 100 times as
big.

Anyway, a POSIX-compliant piece of software should even be designed to
cope with only 4096 bytes (_POSIX_ARG_MAX), so 9.X's 20478 is not too
bad! :-) Ain't standards wonderful?!

Stuart Hood

unread,
Jan 19, 1998, 3:00:00 AM1/19/98
to

Frank Slootweg (fra...@neth.hp.com) wrote:

: Stuart Hood (stu...@iisc.co.uk) wrote:
: [deleted]
: > Is this the only Kernel ever written that doesn't allow
: > ARG_MAX to be changed?

: I do not know about other kernels, but in HP-UX 10.X (your question
: was for a 9.X system), the limit is 2047998 bytes, i.e. 100 times as
: big.

A much more sensible limit!

: Anyway, a POSIX-compliant piece of software should even be designed to


: cope with only 4096 bytes (_POSIX_ARG_MAX), so 9.X's 20478 is not too
: bad! :-) Ain't standards wonderful?!

Yes I know - I even remember the days when that was
the standard system limit.

Yes standards are wonderful - there are so many to
chose from ;-)

0 new messages