rpm/nostdoutclose.diff

14 lines
409 B
Diff

Do not close stdout for scriptlets.
--- ./lib/psm.c.orig 2005-12-14 18:59:10.000000000 +0000
+++ ./lib/psm.c 2006-02-24 11:46:54.000000000 +0000
@@ -829,7 +837,7 @@ static rpmRC runScript(rpmpsm psm, Heade
xx = Fclose (out);
if (sfdno > STDERR_FILENO)
xx = Fclose (scriptFd);
- else {
+ else if (Fileno(out) > STDERR_FILENO) {
/*@-usereleased@*/
xx = Fclose(out);
/*@=usereleased@*/