Re: Some questions related to shell scripts

2005-07-14 Thread Vladislav Belogrudov
--- Dave Anderson <[EMAIL PROTECTED]> wrote: > I started off with what I thought was a simple > question, but googling, > searching mailing list archives, reading man pages, > and testing hasn't > turned up anything I'm happy with and has raised > some new issues... > > In a past life, on a non-U

Re: Some questions related to shell scripts

2005-07-14 Thread Dave Anderson
** Reply to message from Otto Moerbeek <[EMAIL PROTECTED]> on Thu, 14 Jul 2005 17:11:10 +0200 (CEST) >The developer of the shell has the freedom to either spawn a separate >process for a subshell expression or execute the subshell commands in >the in a newly created enviroment that is a copy of th

Re: Some questions related to shell scripts

2005-07-14 Thread Otto Moerbeek
On Thu, 14 Jul 2005, Dave Anderson wrote: > >I did not check your script, but POSIX says this: > > > >$ Expands to the decimal process ID of the invoked shell. In a > >subshell (see Shell Execution Environment ), '$' shall expand to the > >same value as that of the current shell. > > > >

Re: Some questions related to shell scripts

2005-07-14 Thread Dave Anderson
** Reply to message from Otto Moerbeek <[EMAIL PROTECTED]> on Thu, 14 Jul 2005 16:15:11 +0200 (CEST) >On Thu, 14 Jul 2005, Dave Anderson wrote: > >> It also, at least under OpenBSD, has the serious problem that "$$" >> isn't the PID of the shell running the script but rather the PID of the >> "ori

Re: Some questions related to shell scripts

2005-07-14 Thread Vladislav Belogrudov
--- Dave Anderson <[EMAIL PROTECTED]> wrote: > I started off with what I thought was a simple > question, but googling, > searching mailing list archives, reading man pages, > and testing hasn't > turned up anything I'm happy with and has raised > some new issues... > > In a past life, on a non-U

Re: Some questions related to shell scripts

2005-07-14 Thread Otto Moerbeek
On Thu, 14 Jul 2005, Dave Anderson wrote: > It also, at least under OpenBSD, has the serious problem that "$$" > isn't the PID of the shell running the script but rather the PID of the > "original" shell (whatever exactly that means; some testing suggests > that it's the last process on the PPID c

Some questions related to shell scripts

2005-07-14 Thread Dave Anderson
I started off with what I thought was a simple question, but googling, searching mailing list archives, reading man pages, and testing hasn't turned up anything I'm happy with and has raised some new issues... In a past life, on a non-Unix system, I was able to set up simple and effective mutual e