On Fri, Oct 14, 2005 at 02:54:15PM +0200, Javier Fernández-Sanguino Peña wrote:
> 
> execle(shell, shell, "-c", e->cmd, (char *)0, jobenv);
> 
> Which means you are running: sh -c "false; echo $?"
> 
> Here's what I get running in different releases:
(...)

Actually, my test was not correct. I should have done:
sh -c 'false; echo "$?"'

Since, otherwise, the shell will interpret the $? himself and pass on the
current value of it to the sh -c call (so the call changes into 'sh -c "false;
echo 0" before the second subshell executes it. Testing that in all bash
versions returns the expected '1'.

If I use as test snippet '/bin/false && echo yes' (which is less problematic) I
always get 'yes' when it shouldn't be printed. However, I get that,
_regardless_ of wether SElinux is built-in or not, so I don't believe it is
an issue with the SElinux changes.

Will have to investigate some more this issue to find the culprit.

Javier

Attachment: signature.asc
Description: Digital signature

Reply via email to