1

As an example:

$ vim &
[1] 19133
$ bg
[1]+ vim &

[1]+  Stopped                 vim
$

However, I do not want vim to stop when put in the background. Is that possible? (applies for other programs such as login and telnet too)

tildearrow
  • 559
  • 5
  • 12
  • 2
    Whats the point of sending an interactive editor in the background and expected it to work in the background? its not clear..you can just use fg %1 (assuming the jon number is 1) to resume editing in the foreground.. – heemayl Oct 07 '15 at 07:36

2 Answers2

1

Interactive processes that are sent to the background are suspended when they try to read input from the terminal. You can use a terminal multiplexer such as screen

screen -d -m vim

This create a new screen session and automatically detaches it. Use screen -r to reattach to it.

adonis
  • 1,724
0

I do not know whether it is right or wrong if we do

ping google.com &

than it is still running but if we do

cat >abc.txt &

it is not running.Reason for this may be the process which is interactive is stopped because yo can do any thing when these process is in background so save resources