script -c "echo Hallo World" </dev/null >script.log ; cat script.log Before: Hallo World Script started, file is typescript Script started, file is typescript Script done, file is typescript After: Script started, file is typescript Hallo World Script done, file is typescript --- term-utils/script.c | 1 + 1 file changed, 1 insertion(+) diff --git a/term-utils/script.c b/term-utils/script.c index 548334c..02ba596 100644 --- a/term-utils/script.c +++ b/term-utils/script.c @@ -269,6 +269,7 @@ main(int argc, char **argv) { sigprocmask(SIG_SETMASK, NULL, &block_mask); sigaddset(&block_mask, SIGCHLD); + fflush(stdout); sigprocmask(SIG_SETMASK, &block_mask, &unblock_mask); child = fork(); sigprocmask(SIG_SETMASK, &unblock_mask, NULL); -- 2.2.2 -- Best Regards / S pozdravem, Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: sbrabec@xxxxxxx Lihovarská 1060/12 tel: +49 911 7405384547 190 00 Praha 9 fax: +420 284 084 001 Czech Republic http://www.suse.cz/ PGP: 830B 40D5 9E05 35D8 5E27 6FA3 717C 209F A04F CD76 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html