6 ms·
Why couldn't you attach to the screen, press Ctrl-C, then press up arrow to get the original command?
by nickodell 6y ago
Why couldn't you attach to the screen, press Ctrl-C, then press up arrow to get the original command?
- Skunkleton 6y agoor ctrl-z for that matter
- ttsiodras 6y agoThe answer to that is simpler: Try doing the Ctrl-z/fg sequence in your bash with this one: while true ; do sleep 1 ; done You'll see that after 'fg', the loop ends :-) Simply put: C-z followed by fg is not bulletproof. Not to mention that I had no idea what I was running in there, and how any signal would impact it... So I wanted to find a safer way to dump what was already there, in my shell's memory. Anyway, I hope you guys enjoyed reading this regardless :-)
- ttsiodras 6y agoThe script was running in production, doing actual work. Stopping it - when you don't remember a damn thing about it and how it worked - was not an option I wanted to consider at the time.