diff options
| author | Ron Yorston <rmy@pobox.com> | 2026-06-30 17:31:20 +0100 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2026-06-30 17:31:20 +0100 |
| commit | f16e9b40a381618573211b4e82162e819eec1587 (patch) | |
| tree | 771975e67d04d5e691b14132d122e71a1cc73578 /scripts/mkdiff_obj | |
| parent | b2fcbec6605532b7fa9a6e004bab7f731e956913 (diff) | |
| download | busybox-w32-f16e9b40a381618573211b4e82162e819eec1587.tar.gz busybox-w32-f16e9b40a381618573211b4e82162e819eec1587.tar.bz2 busybox-w32-f16e9b40a381618573211b4e82162e819eec1587.zip | |
ash: only copy jobtab if needed for job hack
This script:
#!/bin/bash
(
( true ) &
( true ) &
( true ) &
( true ) &
( true ) &
)
resulted in a crash. The problem was introduced by commit
7b692ddf0c (ash: improved support for jobs built-in). This
commit copies the job table into child shells for use by the
'jobs' built-in.
The crash happens because when the job table is cleared in the
child it becomes available for reuse. If only four jobs are
required this is OK but going over four causes the table to be
reallocated. This doesn't work because in the child it's in
shared memory.
The fix is not to pass the job table to the child unless it's
required by the 'jobs' built-in. This is also more efficient.
Adds 0-16 bytes.
(GitHub issue #604)
Signed-off-by: Ron Yorston <rmy@pobox.com>
Diffstat (limited to 'scripts/mkdiff_obj')
0 files changed, 0 insertions, 0 deletions
