Posts

Showing posts from December, 2013

Fork a Process Attached to my Terminal

So I was dinkering around in my terminal one day and thought I had one program running in the background, when really it was gedit. The first instance of gedit will of course, block my terminal, and I won't be able to use the terminal because it's attached to the GUI. If I wanted my terminal back, I could always Ctrl+Z and go on about my day - but wait, gedit is frozen and I can't use it unless I return my terminal to it by running "fg". Ok, I can close gedit and lose all my tabs, or save my state in a session, and proceed to "gedit &" to run a fork in the background. That's annoying though. So, I saw this and it dawned on me what's going on in the details: root@localhost:/srv/salt#fg gedit top.sls 2> /dev/null > /dev/null ^Z [1]+ Stopped gedit top.sls 2> /dev/null > /dev/null Wait, so the process is "Stopped" ??!? >_> .... ... .. !!! root@localhost:/srv/salt#ps faux|grep gedit root 29482 0.8