On Sun, Jun 09, 2002 at 11:09:51AM -0400, Sam Varshavchik wrote:
> Courier User writes: 
>
> [ ... ]
>
> >Either way, I strongly request that the following non-portable
> >construct be removed from all scripts in the next release of
> >Courier: 
> >
> >  /usr/bin/env - /bin/sh -c "blah; blah; blah ... &"
> 
> I have strong doubts about your theory.  The -c flag to /bin/sh is very 
> portable and should work everywhere.  You'll find it documented in your man 
> page.  Ditto for the -a flag. 
> 
> Let's find out what the real problem is, instead of making guesses. 

Here is a small subset of the group of tests that I performed on my
freebsd 4.0 system before posting my previous message:

1% echo "echo foo" >/tmp/xxx
2% /usr/bin/env - /bin/sh -c ". /tmp/xxx; echo bar &"
bar
3% /usr/bin/env - /bin/sh -c ". /tmp/xxx; echo bar"
foo
bar
4% /usr/bin/env - /bin/sh -c "(. /tmp/xxx; echo bar) &"
bar
5% echo "T=foo; export T" >/tmp/xxx
6% /usr/bin/env - /bin/sh -c "T=bar; export T; . /tmp/xxx; /usr/bin/env &"
T=bar
7% /usr/bin/env - /bin/sh -c "T=bar; export T; . /tmp/xxx; /usr/bin/env"
T=foo

Note that the presence of the ampersand changes the behavior.

Furthermore, when I start Courier using the -c flag in
share/courierctl, and when I do "ps auexwww | egrep 'courier[d]'",
none of the variables set in etc/courierd appear in the environment.
However, when I start Courier using the "here document" in
share/courierctl, then all variables set in etc/courierd appear in
the environment when I do a  "ps auexwww | egrep 'courier[d]'".

And finally, when I insert "/bin/date >>/tmp/xyz" as the first line
of etc/courierd, nothing gets put into the "xyz" file when I start
Courier using -c in share/courierctl; however, when I start courier
using the "here document" in share/courierctl.

You may not get these same results on your own system, but I
consistently get them on mine.

As you can see, this is not due to "guesses".

Thank you very much.


> -- 
> Sam 

-- 
 Courier User
 [EMAIL PROTECTED]

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to