On 12/26/11 10:12 AM, Stas Sergeev wrote:
> Hi.
>
> It seems the -i switch of the bash doesn't work as expected
> these days (I tried with bash-4.1).
I'm not sure what `expected' means here; both code fragments are
correct.
> I've found 2 places of the breakage.
>
> 1. initialize_job_control ()
> For the purposes of that code fragment, 1 is both safe and unusual.
OK
On 12/25/11 10:51 AM, Askar Safin wrote:
> In jobs.c we see:
>
> #if defined (RECYCLES_PIDS)
> if (last_asynchronous_pid == mypid)
> /* Avoid pid aliasing. 1 seems like a safe, unusual pid value. */
> last_asynchronous_pid = 1;
> #endif
>
> 1 is not safe, unusual PID value,
> This is really a help-bash question. Please send all follow-ups
> there.
This.
However, see:
http://mywiki.wooledge.org/BashFAQ/100
for a more in-depth look at different string manipulation techniques,
including that one.
DJ