Closed marckleinebudde closed 3 years ago
Much better, thanks.
When developing on genimage, SHELL points at the current shell of the developer - which may not be POSIX-compatible at all (for example I use zsh, which causes most distchecks to fail).
I don't know what systemp()
is used for exactly, but it seems using a "clean" POSIX shell that doesn't mess with the environment (i.e. /bin/sh
) would be the more robust choice.
Good point. Making it possible to overwrite the shell is still useful. So maybe a different environment variable? GENIMAGE_SHELL
maybe?
@marckleinebudde what do you think?
This patch changes systemp() to use the shell defined in the environment variable SHELL rather then hard coded /bin/sh, so that the called programs can use shell functions exported in the calling shell. Use "/bin/sh" as a fall back.
Signed-off-by: Marc Kleine-Budde mkl@pengutronix.de