Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by emergie on Friday October 30, 2015 @11:03AM
(#10478228)
it doesn't, ctrl-z only suspends process and switches to backgroud - the thing is still alive
try ctrl-z and then type bg command - you will see a list, you can resume with fg [number]
[ Parent
| on HN ]
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.
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.
Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by dllthomas on Saturday October 31, 2015 @03:15AM
(#10482075)
With bg, it is likely to suspend itself again by attempting to read from the terminal (which a text editor is likely to do basically all the time).
Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by Anderkent on Friday October 30, 2015 @11:33AM
(#10478422)
Well, it might still run but it lets you out of the editor, which is the goal here. You can just kill -9 it afterwards.
Re:Show HN: Twitch Installs Arch Linux – A cooperative text-...
by mcguire on Friday October 30, 2015 @12:57PM
(#10478975)
If you have good reflexes, you can type "^Z" right after "kill -9", before the syscall to send the signal is executed.
Legend has it that, if you do, you bring on the Singularity immediately.