Eric Sunshine <ericsunshine@xxxxxxxxxxx> writes: > From: Eric Sunshine <sunshine@xxxxxxxxxxxxxx> > > The behavior of a one-shot environment variable assignment of the form > "VAR=val cmd" is undefined according to POSIX when "cmd" is a shell Please use the right word to describe what the standard says. Throughout the topic's discussion, you seem to be repeating "undefined", but the word POSIX uses for this particular unportable behaviour is "unspecified". The differences are subtle, and for programs that want to be conformant, there is no practical difference (in other words, we should not rely on the existence or validity of the value or behaviour if we wanted to be portable). The former is what results from use of an invalid construct or feeding an invalid data input. The implementation can do whatever it wants to do once you trigger an undefined behaviour. The latter is what results from use of a valid construct or valid data input, but outcome may differ across implementations. An "unspecified" behaviour often are still consistent and sensible within a single conformant implementation.