Re: RUN and the shell
Posted in 1995
> Q. Is there a way to force the RUN command to use sh?
> An informix specific env setting perhaps?
Yes. That happened to one of the guys here. What we did was to set
SHELL environment variable to /bin/sh. 4GL's RUN uses SHELL
variable to start up a shell. Another gotcha in the area is that for
System V Rel 3 (dunno about BSD, and others) the total number of
characters in your environment PLUS the command line can not exceed 5K
bytes. This one had us scratching our heads for a while until we
figured out what the problem was. This has a very big impact on
Makefiles.
> If not then I guess I'm stuck with setting SHELL prior to fglgo'ing
> and restting it afterwards.
Ah, just write a little teensy script:
#!/bin/sh
# kick off fglgo (bourne shell version)
#
set -a #export all variables automatically
INFORMIXDIR=${INFORMIXDIR:-'/usr/informix'}SHELL=/bin/sh
exec $INFORMIXDIR/bin/fglgo "$@"
And your csh's SHELL wont be changed in any way. A child shell can not
change any of his/her parent's environment variable. If your Unix
system doesn't understand #!/bin/sh, then you can rewrite the script
in csh.
> Cheers, Ian.
--
-------------------------------------------------------
| Paul T. Pryor | Computer Data Systems, Inc |
| (703) 756-8350 Voice/TDD | Falls Church, VA USA |
|-------------------------------------------------------|
| ptp@fallschurch-acirs2.army.mil [192.86.95.3] |
-------------------------------------------------------