/usr/bin/script doesn't wait for command to finish before exiting
Bug #264967 reported by
Fergus Henderson
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
util-linux (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The script command fails to wait for the command that it is executing to finish.
For example, the command
/usr/bin/script -c "sleep 1; echo foo" < /dev/null; echo bar
produces the output
Script started, file is typescript
Script done, file is typescript
bar
foo
and an empty "typescript" file, whereas the correct output should be
Script started, file is typescript
foo
Script done, file is typescript
bar
and the "typescript" file should contain "foo".
The attached patch fixes the problem.
To post a comment you must log in.
Hi Fergus,
Thanks for reporting this bug! We could fix it in Ubuntu, but i would really prefer if this could be fixed upstream as it is something that affects the functioning of the program.
Instructions on how to report bugs against util-linux-ng can be found here. userweb. kernel. org/~kzak/ util-linux- ng/
http://
Thanks!
If you are unable to report it upstream for any reason, please let me know and I will see if I can assist.