Background processes with Cygwin
I have been beating my head on a wall for two weeks and have googled til my fingers bled. I am running windows server 2003 with cygwin. I am attempting to get a bash script to continue to run in cygwin even after I have logged out. I have tried several different tactics. The most recent and closest to success has been using the “nohup” command. I am opening a cygwin bash window and typing the following: $ nohup mycommand.bash & The script runs in the background but the bash window stays open. When I log out or try to close the window I executed nohup from, I get the following error…… $ 3 [main] ? child_copy: cygheap read copy failed, 0x611688E0..0x611706D0m dibe 0, windows pid 0, Win32 error 5 1876 [main] bash 5072 child_copy: dll data read copy failed, 0x61102000..0x61106BA0, done 0, windows pid 5072, Win32 error 5 The window will stay up for a few minutes and then go away and the script that was running is now dead. I am not an expert by any means so any help regardless of elementary is appreciated. I know I am not the first squirrel to try to crack this nut so I figured I would toss this out in hopes some “big brain” would take notice and pity. _ Windows Live™: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_042009 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/
Re: Background processes with Cygwin
--- On Fri, 4/3/09, Jeff Irwin wrote: > From: Jeff Irwin > Subject: Background processes with Cygwin > To: cygwin-xfree@cygwin.com > Date: Friday, April 3, 2009, 2:48 PM > The window will stay up for a few minutes and then go away > and the script that was running is now dead. > > I am not an expert by any means so any help regardless of > elementary is appreciated. I know I am not the first > squirrel to try to crack this nut so I figured I would toss > this out in hopes some “big brain” would take notice and > pity. PMFJI here, but if you log out of Cygwin, then the Cygwin process terminates. Why would you think that a process started under Cygwin could survive the termination of Cygwin? That just doesn't make sense, even to this raw newbie. Among other things, the whole *ix environment that Cygwin provides would be gone, so how could your process possibly continue? This isn't "real" *ix, it's *ix facilities provided under the control of another quite different (and generally more hostile) OS environment. Maybe I'm missing something crucial in my understanding of how Cygwin and Windows operate. If so, I'd appreciate a cure for my ignorance. Peter -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/
Re: Background processes with Cygwin
http://www.cygwin.com/acronyms/#PCYMTNQREAIYR On Sat, Apr 4, 2009 at 9:50 PM, Peter Farley wrote: > > --- On Fri, 4/3/09, Jeff Irwin wrote: Don't quote headers like this. It's not useful to anyone, and it feeds the spammers. >> From: Jeff Irwin >> Subject: Background processes with Cygwin >> To: x...@xxx.xxx >> Date: Friday, April 3, 2009, 2:48 PM > http://www.cygwin.com/acronyms/#PCYMTWLL - Reformatted > PMFJI here, but if you log out of Cygwin, then the Cygwin process terminates. > Why would you think that a process started under Cygwin could survive the > termination of Cygwin? That just doesn't make sense, even to this raw > newbie. You're missing something big. Cygwin isn't a process. It's a DLL that provides a UNIX-like environment. You don't terminate cygwin, you terminate a shell that's using the Unix emulation provided by cygwin1.dll. > Among other things, the whole *ix environment that Cygwin provides would be > gone, so how could your process possibly continue? This isn't "real" *ix, > it's *ix facilities provided under the control of another quite different > (and generally more hostile) OS environment. The *ix facilities are provided by a DLL, not by a process, and the applications can continue running after the shell exits, just like in any other *ix - the DLL didn't go away, after all. > Maybe I'm missing something crucial in my understanding of how Cygwin and > Windows operate. If so, I'd appreciate a cure for my ignorance. Hopefully this clears things up. Unfortunately, I'm not sure why things aren't working for the OP. In any event, switching to the main cygwin list instead of the cygwin-xfree list (which is only for X11 related issues) would probably help get him the help he needs. ~Matt -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/
Re: Background processes with Cygwin
--- On Sat, 4/4/09, Matt Wozniski wrote: > From: Matt Wozniski > Subject: Re: Background processes with Cygwin > To: cygwin-xfree@cygwin.com > Date: Saturday, April 4, 2009, 11:02 PM > http://www.cygwin.com/acronyms/#PCYMTNQREAIYR > > On Sat, Apr 4, 2009 at 9:50 PM, Peter Farley > wrote: > > > > --- On Fri, 4/3/09, Jeff Irwin wrote: > > Don't quote headers like this. It's not useful to > anyone, and it feeds the spammers. > > >> From: Jeff Irwin > >> Subject: Background processes with Cygwin > >> To: > >> Date: Friday, April 3, 2009, 2:48 PM > > > > http://www.cygwin.com/acronyms/#PCYMTWLL > - Reformatted > > > PMFJI here, but if you log out of Cygwin, then the > > Cygwin process terminates. Why would you think > > that a process started under Cygwin could survive > > the termination of Cygwin? That just doesn't make > > sense, even to this raw newbie. > > You're missing something big. Cygwin isn't a > process. It's a DLL that provides a UNIX-like > environment. You don't terminate cygwin, you > terminate a shell that's using the Unix > emulation provided by cygwin1.dll. > > > Among other things, the whole *ix environment > > that Cygwin provides would be gone, so how could > > your process possibly continue? This isn't "real" > > *ix, it's *ix facilities provided under the > > control of another quite different > > (and generally more hostile) OS environment. > > The *ix facilities are provided by a DLL, not by a > process, and the applications can continue running > after the shell exits, just like in any other > *ix - the DLL didn't go away, after all. > > > Maybe I'm missing something crucial in my > > understanding of how Cygwin and Windows operate. > > If so, I'd appreciate a cure for my ignorance. > > Hopefully this clears things up. Unfortunately, I'm > not sure why things aren't > working for the OP. In any event, switching to the > main cygwin list instead of > the cygwin-xfree list (which is only for X11 related > issues) would probably > help get him the help he needs. Apologies for both of those trespasses. I didn't look at what yahoo mail was generating. Serves me right for not looking. Mea maxima culpa, and I will check first and fix it in the future. Unfortunately yahoo's web email isn't very bright. And thank you for those explanations. They do help cure my ignorance. Peter -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/