From: Frederic B. <fre...@fr...> - 2010-02-28 19:34:20
|
Alex, Terrasync doesn't stop itself if nothing comes from the socket. I am going to make it global and close it in the handler. -Fred Le 28/02/2010 17:51, Alex Perry a écrit : > Attached patch replaces the stream with a single direct call to > write() inside the signal handler; someone Windows based might want to > give it a look before committing. I also removed references to std:: > which are they're superfluous after "using namespace" directive at the > top. > > On Sun, Feb 28, 2010 at 8:16 AM, Alex Perry <ale...@ie...> wrote: > >> On Sun, Feb 28, 2010 at 3:59 AM, Tim Moore <tim...@gm...> wrote: >> >>> Whoops, I'm a bit late with my comments, but all the same... >>> >>> You can't safely use C++ stream functions in a signal handler. >>> >> Drat, true. A simple write() would be fine, given what I'm using it for. >> >> >>> Why does terrasync need to be protected from interruption like this? Does >>> the SVN update really get corrupted if it is interrupted? >>> >> Yep. If we think the individual update could take a long time, we >> could go to the extra effort and use the svn internal interruption >> handlers. >> >> |