Commit 1bf5a3f
committed
flux-job: handle log and output messages with pty attach
Problem: When a job uses an interactive pty, such as with
flux-alloc(1), the job's output eventlog is ignored because it is
presumed all output is being handled through the pty. However,
this means that all log messages, including error messages, are
suppressed. This can result in confusing behavior. For instance,
if the shell cannot change its working directory, it logs an error
message. If the user does not see this message they may think the
software is broken for other reasons.
Process the output eventlog with `flux job attach` even when
interactively attaching to a pty. Task output and log messages are
sent the users original terminal. Since the terminal is assumed to be
in raw mode, add the missing carriage return ('\r') to these messages
to avoid leaving the cursor in the wrong column. If interactive pty
output is also being captured via the pty.capture option, then skip
output for rank 0 since it will likely be duplicated.
Fixes #52721 parent 6597d10 commit 1bf5a3f
1 file changed
+27
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1576 | 1576 | | |
1577 | 1577 | | |
1578 | 1578 | | |
| 1579 | + | |
1579 | 1580 | | |
1580 | 1581 | | |
1581 | 1582 | | |
| |||
1646 | 1647 | | |
1647 | 1648 | | |
1648 | 1649 | | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
1649 | 1659 | | |
1650 | 1660 | | |
1651 | 1661 | | |
| |||
1654 | 1664 | | |
1655 | 1665 | | |
1656 | 1666 | | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
1657 | 1672 | | |
1658 | 1673 | | |
| 1674 | + | |
1659 | 1675 | | |
1660 | 1676 | | |
1661 | 1677 | | |
| |||
1725 | 1741 | | |
1726 | 1742 | | |
1727 | 1743 | | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
1728 | 1749 | | |
1729 | 1750 | | |
1730 | 1751 | | |
| |||
2314 | 2335 | | |
2315 | 2336 | | |
2316 | 2337 | | |
2317 | | - | |
| 2338 | + | |
2318 | 2339 | | |
2319 | 2340 | | |
2320 | 2341 | | |
2321 | 2342 | | |
2322 | 2343 | | |
2323 | | - | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
2324 | 2347 | | |
2325 | 2348 | | |
2326 | 2349 | | |
| |||
2333 | 2356 | | |
2334 | 2357 | | |
2335 | 2358 | | |
| 2359 | + | |
2336 | 2360 | | |
2337 | 2361 | | |
2338 | 2362 | | |
2339 | 2363 | | |
2340 | 2364 | | |
2341 | | - | |
| 2365 | + | |
2342 | 2366 | | |
2343 | | - | |
2344 | | - | |
2345 | 2367 | | |
2346 | 2368 | | |
2347 | 2369 | | |
| |||
0 commit comments