A GNU bash2 oddity -- was: Re: [NTLUG:Discuss] An Oddity (bug) inRedhat 7.1

Kenneth Loafman ken at lt.com
Tue Oct 30 06:53:37 CST 2001


Steve Baker wrote:
> 
> Kenneth Loafman wrote:
> >
> > Thanks for the help on this.  Looks like we want to find a new rpm for
> > bash for 7.1, then everything will work.  That's easier than going back
> > through the full release process for our code.  Will put in a bug report
> > against our stuff to move away from the use of the system() call.  [FYI
> > - system() uses /bin/sh by default, so changing the behavior of system()
> > may be more problematic].
> 
> I don't know any way to change 'system()' to call an alternative shell - but
> you can easily reproduce what system() does using a 'fork()' followed by
> an 'execle()' or one of it's close cousins - then you can call any shell
> you want...or no shell at all.

Yes, that would work, but what I really need to do is run /bin/bash as
the outer shell to bring up the two Python job servers, then run
popen4() under the Python job servers so I'm not dependent upon system()
behavior anywhere.

If I could just figure out whether I was background or forground, I
could figure out whether to produce the log to the screen or to the log
file(s).

The sample test I put together was just to prove that there was not due
to a difference between ActiveState Python on one machine and python.org
relases on the other machines.  Instead it turned out to be at a more
pervasive level.

...Ken



More information about the Discuss mailing list