I have a .NET program (Edit: using MONO), call it
myfoo that resides on my remote ubuntu server. To access it, I ssh into my box (using wifi, not ethernet). My bash shell starts up as normal, I cd to the directory, and then run the program via
mono myfoo. this all works fine.
Unfortunately, the company where I work has some pretty obnoxious wifi problems. The short version is that the vpn craps out every now and then, so while my device stays connected to the wifi, the whole network connection is severed to my server.
Naturally, this causes my device to eventually realize the connection is gone, and displays the traditional broken pipe error. Now, here's the problem:
When I re-connect, and start myfoo again, it doesnt work. I've tracked down the problem to the fact that when the connection breaks, bash doesn't end the previous instance of myfoo. I have to manually kill the previous instance before starting the new one. For various reasons, this is a problem. I would have expected that when the connection broke, bash would exit, and therefore kill any children it spawned. Apparently, that isn't happening. Is there a way I can MAKE it happen? I would prefer not to change the sourcecode of the program, but if I need to in order to catch an interrupt or something I can. I would prefer if there was some solution in my bash profile settings or something that would allow this behavior to take place.