bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Idea: jobs(1) -i to print only :%ID:s


From: Robert Elz
Subject: Re: Idea: jobs(1) -i to print only :%ID:s
Date: Fri, 10 Nov 2023 04:22:45 +0700

    Date:        Thu, 09 Nov 2023 21:04:28 +0100
    From:        Steffen Nurpmeso <steffen@sdaoden.eu>
    Message-ID:  <20231109200428.8G9Lz%steffen@sdaoden.eu>

  | ash(1) and busybox ash(1) do not even support jobs -l in a function (yet).

That seems unlikely, ash based shells mostly don't care whether the commands
they're running are in a function or not, except for those few commands for
which that is important (like return, local, etc).

Are you sure that you're not seeing the effects of running jobs in a
subshell environment (in a command substitution) - where no jobs have
yet been created in that environment.   Modern shells allow jobs (like
trap) there, as a way to get the parent shell's jobs (or traps), but
even now (in the latest drafts) POSIX does not require that jobs works
that way (it does for trap, in very limited cases).

kre




reply via email to

[Prev in Thread] Current Thread [Next in Thread]