Great/hooray/fantastic. Thank you.
- joey
At 15:45 -0400 2006/06/30, Eric Iverson wrote:
Joey,
If the sentence required to build the ARGV argument is longer than
30000 the system will exit with code 100. There will not be an
incorrect /incomplete result and there will not be a crash.
----- Original Message ----- From: "Joey K Tuttle" <[EMAIL PROTECTED]>
To: "Beta forum" <[email protected]>
Cc: "Beta forum" <[email protected]>
Sent: Wednesday, June 21, 2006 6:22 PM
Subject: Re: [Jbeta] #! script command line input limitations
Hmmm, that's too bad. In general, I would rather have a
crash than an incorrect/incomplete result...
- joey
At 17:30 -0400 2006/06/21, Eric Iverson wrote:
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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm