Commit ea1fd48
committed
Merge branch 'jk/run-command-capture'
The run-command interface was easy to abuse and make a pipe for us
to read from the process, wait for the process to finish and then
attempt to read its output, which is a pattern that lead to a
deadlock. Fix such uses by introducing a helper to do this
correctly (i.e. we need to read first and then wait the process to
finish) and also add code to prevent such abuse in the run-command
helper.
* jk/run-command-capture:
run-command: forbid using run_command with piped output
trailer: use capture_command
submodule: use capture_command
wt-status: use capture_command
run-command: introduce capture_command helper
wt_status: fix signedness mismatch in strbuf_read call
wt-status: don't flush before running "submodule status"File tree
5 files changed
+44
-24
lines changed5 files changed
+44
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
560 | | - | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
561 | 566 | | |
562 | 567 | | |
563 | 568 | | |
| |||
829 | 834 | | |
830 | 835 | | |
831 | 836 | | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
74 | 87 | | |
75 | 88 | | |
76 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
576 | 576 | | |
577 | 577 | | |
578 | 578 | | |
579 | | - | |
580 | 579 | | |
581 | | - | |
| 580 | + | |
582 | 581 | | |
583 | 582 | | |
584 | | - | |
585 | 583 | | |
586 | 584 | | |
587 | 585 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | 217 | | |
228 | 218 | | |
229 | 219 | | |
| |||
240 | 230 | | |
241 | 231 | | |
242 | 232 | | |
243 | | - | |
244 | 233 | | |
245 | 234 | | |
246 | | - | |
| 235 | + | |
| 236 | + | |
247 | 237 | | |
248 | 238 | | |
249 | | - | |
| 239 | + | |
| 240 | + | |
250 | 241 | | |
| 242 | + | |
251 | 243 | | |
252 | 244 | | |
253 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
729 | 729 | | |
730 | 730 | | |
731 | 731 | | |
732 | | - | |
733 | 732 | | |
734 | 733 | | |
735 | 734 | | |
| |||
745 | 744 | | |
746 | 745 | | |
747 | 746 | | |
748 | | - | |
749 | | - | |
750 | 747 | | |
751 | | - | |
752 | | - | |
753 | | - | |
| 748 | + | |
754 | 749 | | |
755 | 750 | | |
756 | | - | |
| 751 | + | |
757 | 752 | | |
758 | 753 | | |
759 | 754 | | |
| |||
764 | 759 | | |
765 | 760 | | |
766 | 761 | | |
| 762 | + | |
767 | 763 | | |
768 | 764 | | |
769 | 765 | | |
| |||
0 commit comments