Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by jokr004 on Friday October 30, 2015 @04:02PM
(#10480200)
Ctrl-z by itself doesn't actually switch the process to run in the background, it stops the process. Running 'bg' is what starts the process back up running in the background, 'fg', like you said, resumes the process in the foreground and 'jobs' is the command you can run to see a list of processes that are running.
[ Parent
| on HN ]
Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by waterhouse on Saturday October 31, 2015 @05:44AM
(#10482248)
Since the question was "Ctrl-z works universally", I feel obliged to point out that ctrl-z sends SIGTSTP, which can be blocked--not to be confused with SIGSTOP, which cannot be blocked. I don't know of any program that does intercept SIGTSTP (except a test program I wrote that tries to print the name of any signal it receives), and I suspect that "polite" interception would be to release a few resources and then accept being paused--but, in theory, a program could ignore it.
Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by FreeFull on Saturday October 31, 2015 @09:18AM
(#10482554)
Many curses programs (for example vim) intercept ^Z to set the terminal back into a more normal mode and then pause.
Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by Touche on Saturday October 31, 2015 @12:47PM
(#10483197)
This is probably a stupid question, didn't know about bg and fg before. But after playing around with it, it feels pretty amazing, why even use screen/tmux when you have these?
Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by wutbrodo on Saturday October 31, 2015 @02:37PM
(#10483605)
Screen has aaugh easier interface for multitasking, including things like stderr not bleeding out from whatever background tasks you're running. Not to mention that switching back and forth between screens is what it's designed for and thus a lot easier than switching between job numbers. Also the ability to detach your screen and its running processes from being coupled to a specific login session, which is probably the main reason I started using screen instead of multiple terminals in the first place.