I'm afraid the "no mans land" of wrong results are still possible for 'very long arguments'. I don't intend to pursue it at this time.

----- Original Message ----- From: "Joey K Tuttle" <[EMAIL PROTECTED]>
To: "Beta forum" <[email protected]>
Sent: Wednesday, June 21, 2006 5:26 PM
Subject: Re: [Jbeta] #! script command line input limitations


Thanks! That sounds like a great improvement and I shall
verify it at first opportunity.

I certainly hope this also removes the "no man's land" that
caused an incorrect result as described below - maybe harder
to test.

- joey


At 17:15  -0400 2006/06/21, Eric Iverson wrote:
I have increased the limit on the length of #! script arguments for linux and mac. It is not easy to make it dynamic and I have settled on just increasing it to about 30000 for the total length of the command line argument. This command line is passed to J as a sentence something like: ....various stuff... ARGV=:......;'arg0';'arg1';'arg2';....................... The limit on the length of this sentence is now 30000. The real limit is in the fixed size buffer that must be passed to the host call to fgets.

In your test example this would allow for more than 2000 files of name length 10.

This change will be in the next beta. Please verify at that time that this minimally satisfiies your requirements.

----- Original Message ----- From: "Joey K Tuttle" <[EMAIL PROTECTED]>
To: "Beta forum" <[email protected]>
Sent: Thursday, June 01, 2006 12:57 AM
Subject: Re: [Jbeta] Darwin #! script command line input limitations

At 23:34  -0700 2006/05/30, Joey K Tuttle wrote:
There is considerable improvement in j601 on this issue, but I'm still
surprised at the seemingly small limit.


Now that I have a working j601 in a Linux environment, I ran
some of the same tests and found that the limit on !# arguments
is more severe in Linux than in Darwin. Plus there seems to be
a more serious bug that crops up ...

[EMAIL PROTECTED]:~/test$ ./mkfiles 100
j601/beta/2006-05-20/22:30
Running in: Linux
[EMAIL PROTECTED]:~/test$ ./atest 1*
102 7040

This looks OK, 7 Kbytes and the 100 files + first two items in ARGV

[EMAIL PROTECTED]:~/test$ ./mkfiles 200
j601/beta/2006-05-20/22:30
Running in: Linux
[EMAIL PROTECTED]:~/test$ ./atest 1*
148 10496

Ooops!! Something is wrong here. The argument count should be
202, not 148 -- this seems to be a bug (and would be serious
in a real application)

[EMAIL PROTECTED]:~/test$ ./mkfiles 250
j601/beta/2006-05-20/22:30
Running in: Linux
[EMAIL PROTECTED]:~/test$ ./atest 1*
148 10496

[EMAIL PROTECTED]:~/test$ ls 1* | wc
    250     250    1250

More files - but the argument count and size is the same...

[EMAIL PROTECTED]:~/test$ ./mkfiles 280
j601/beta/2006-05-20/22:30
Running in: Linux
[EMAIL PROTECTED]:~/test$ ./atest 1*
Segmentation fault
[EMAIL PROTECTED]:~/test$

Finally we hit the wall that crashes j, but this is at a much
lower point than in Darwin - and I would really like to see the
number of arguments to a !# script be > 1000 (or higher).

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to