[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Interactive commands cant be backgrounded if run from bashrc
From: |
Greg Wooledge |
Subject: |
Re: Interactive commands cant be backgrounded if run from bashrc |
Date: |
Wed, 1 Sep 2021 22:33:20 -0400 |
On Wed, Sep 01, 2021 at 09:28:55PM -0500, Dennis Williamson wrote:
> On Wed, Sep 1, 2021, 8:42 PM Greg Wooledge <greg@wooledge.org> wrote:
> > I tested with "set -m" and "vim & fg" just now, and it appeared to work.
>
> Do processes started in .bashrc have a terminal? I would suspect that
> something without a try would either complain or work differently. I'll
> have to play around with it.
As long as bash is started in a terminal: yes.
I also tested with "set -m" and "vim" in my .bashrc file. Everything
worked as I expected it to. I launched a terminal (urxvt), and it opened
with vim running. I was able to Ctrl-Z it. It looks like this:
[1]+ Stopped vim
unicorn:~$ jobs
[1]+ Stopped vim
unicorn:~$ ps
PID TTY TIME CMD
2100754 pts/30 00:00:00 bash
2100756 pts/30 00:00:00 vim
2100757 pts/30 00:00:00 ps
unicorn:~$
I could also "fg" it, and exiting from vim put me into an interactive
bash shell. Absolutely no surprises at all.
- Interactive commands cant be backgrounded if run from bashrc, C. Yang, 2021/09/01
- Re: Interactive commands cant be backgrounded if run from bashrc, Chet Ramey, 2021/09/02
- Re: Interactive commands cant be backgrounded if run from bashrc, C. Yang, 2021/09/02
- Re: Interactive commands cant be backgrounded if run from bashrc, Greg Wooledge, 2021/09/02
- Re: Interactive commands cant be backgrounded if run from bashrc, Chet Ramey, 2021/09/02
- Re: Interactive commands cant be backgrounded if run from bashrc, C. Yang, 2021/09/02
- Re: Interactive commands cant be backgrounded if run from bashrc, Chet Ramey, 2021/09/02
- Re: Interactive commands cant be backgrounded if run from bashrc, C. Yang, 2021/09/02