Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: MAXJOB
- X-seq: zsh-workers 8584
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: MAXJOB
- Date: Sun, 7 Nov 1999 07:06:54 +0000
- In-reply-to: <19991105122341.A29632@xxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <19991105122341.A29632@xxxxxxxx>
On Nov 5, 12:23pm, Clint Adams wrote:
} Subject: MAXJOB
}
} What was the reasoning behind hardcoding MAXJOB to 50?
It's a fixed number so that the job table can be statically declared
rather than dynamically allocated. I've forgotten (or never knew) why
the value 50 was chosen, or whether there's a still-valid reason to
avoid dynamic allocation of the job table.
} Furthermore, why does MAXJOB 50 result in a maximum
} job table size of 48?
The last job table slot is reserved for tracking builtin commands, so
that the whole shell doesn't become unusable when you fill up the rest
of the table with external processes. It's nice to be able to kill
those runaway background jobs, is it not?
jobtab[0] is also reserved, but it may be for no better reason than to
avoid having to map 1-based user-visible job-numbers to 0-based table
locations. I don't immediately recall anything else that's being done
with it.
In fact, it may be that 50 was chosen so that the number of job table
entries would *appear* to be a multiple of 8.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author