[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash cannot kill itself?
From: |
Clark J. Wang |
Subject: |
Re: Bash cannot kill itself? |
Date: |
Wed, 30 Jun 2010 13:25:12 +0800 |
On Wed, Jun 30, 2010 at 1:17 PM, Jan Schampera <jan.schampera@web.de> wrote:
> Chris F.A. Johnson wrote:
>
> $$ refers to the subshell.
>>>>
>>>
>>> There's no subshell here, I think.
>>>
>>
>> The background process invoked by &.
>>
>
> $$ is meant to always report the "main shell", I'd guess this is true for
> this case, too.
>
> Running a cmd in background (by &) would not create subshell. Simple
testing:
#!/bin/bash
function foo()
{
echo $$
}
echo $$
foo &
### END OF SCRIPT ###
The 2 $$s output the same.
> J.
>
>
- Bash cannot kill itself?, Clark J. Wang, 2010/06/30
- Re: Bash cannot kill itself?, Chris F.A. Johnson, 2010/06/30
- Re: Bash cannot kill itself?, Clark J. Wang, 2010/06/30
- Re: Bash cannot kill itself?, Chris F.A. Johnson, 2010/06/30
- Re: Bash cannot kill itself?, Jan Schampera, 2010/06/30
- Re: Bash cannot kill itself?,
Clark J. Wang <=
- Re: Bash cannot kill itself?, Jan Schampera, 2010/06/30
- Re: Bash cannot kill itself?, Clark J. Wang, 2010/06/30
- Re: Bash cannot kill itself?, Chris F.A. Johnson, 2010/06/30
- Re: Bash cannot kill itself?, Pierre Gaston, 2010/06/30
- Re: Bash cannot kill itself?, Pierre Gaston, 2010/06/30
- Re: Bash cannot kill itself?, Clark J. Wang, 2010/06/30
Re: Bash cannot kill itself?, Andreas Schwab, 2010/06/30