Mail Archives: cygwin/2009/12/04/08:42:10
Linda Walsh wrote:
> In bash I start a copy of gvim.exe (64-bit windows version) in
> background.
> I disown the job in bash so bash no longer manages the job -- it
> should be
> a free and clear process (unaffected by bash exiting).
>
> Yet when I exit the bash window (bash running in a console window), Gvim
> is killed. Why should bash or the console exiting kill off any processes
> running in the background?
>
I have had the same frustration for a while. When in a bash shell start
gvim with:
cmd /c gvim
then you can exit the bash shell without killing gvim.
FWIW:
I am using gvim v7.0 for 32bit MS-Windows
it is set up as a server by sourcing the following in .bash_profile:
function gvim
{
if [ -z "$1" ] ; then
$VIMRUNTIME/gvim.exe --servername GVIM &
else
$VIMRUNTIME/gvim.exe --servername GVIM --remote-silent $1 &
fi
}
cheera,
roger wells
> It would be the same question of it was the win32-X based Gvim -- it
> would
> be killed as well, but one could argue that cygwin has to shut down all
> cygwin processes when it exits -- but I still don't see that as being
> necessary.
>
> It's certainly not what happens when I log into a linux workstation and
> bring up Gvim displaying locally (an X version, not a Windows
> version...:-)). I can terminate the tty window to a linux box and the X
> program just keeps on running (unless I was running it's display
> through a
> copy of SSH that terminates with the window's exit. I try to avoid that
> on my local network.
>
> So why does cygwin have to terminate any processes when I exit the shell
> window? If I've disowned the job, I obviously don't care about any
> output
> -- I could use nohup in front of it, if I wanted to capture such, but it
> wouldn't matter, they all seem to be required to die, and I don't
> understand why.
>
> I find it ironic to think about the discussion about characters when
> something important like jobs running in background normally doesn't even
> work right, but I don't understand why it has to be that way.
> I find it *especially* annoying, when it kills off a windows program --
> there can be no good reason for that.
>
> I guess I also don't quite get why I don't get back immediate control
> when I start gvim under bash.exe, but if I start cmd.exe within bash,
> then gvim behaves 'normally' (auto backgrounds and doesn't terminate
> when cygwin does). So it's obvious that there's no reason, at least,
> why cygwin should "go out of its way" to kill off any launched
> processes. Or does it not do that?
>
> linda
>
>
> --
> Problem reports: http://cygwin.com/problems.html
> FAQ: http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>
>
--
Roger Wells, P.E.
SAIC
221 Third St
Newport, RI 02840
401-847-4210 (voice)
401-849-1585 (fax)
roger DOT k DOT wells AT saic DOT com
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -