Thread View: news.software.readers
7 messages
7 total messages
Started by David Gerard
Wed, 23 Feb 2000 00:00
slrnpull win32 problem
Author: David Gerard
Date: Wed, 23 Feb 2000 00:00
Date: Wed, 23 Feb 2000 00:00
32 lines
2012 bytes
2012 bytes
*Damn* this is annoying. Using slrnpull 0.9.6.2 under Win32. Server's on a really slow connection (1000-5000ms ping times, ~100-500 bytes/second) relative to me. Sometimes, the connection seems to just ... die. And NOT drop out. And I can't get the slrnpull to die in such a way that it cleans up properly. Ctrl-G doesn't work. Ctrl-C and it dies without cleaning up (restarting leads to downloading the same articles twice and duplicate .overview entries). Is there anything I can do about this? Can a future version trap the first Ctrl-C and clean up properly, and take a *second* Ctrl-C as die-right-now? Do these questions make sense in this context? [For those who ignored the message in the headers: I have slrn/slrnpull 0.9.5.4 reading this server and 0.9.6.2 reading the other one, for comparison purposes.] -- http://xenu.netizen.com.au/ http://www.caube.org.au/ "It is more than possible to be a member of a sub-culture, a different and 'outside the box' thinker who's dealt with the hardships of being different and other people's scorn and *still* be an intolerant fuckwit." (Morgan Jaffit)
Re: slrnpull win32 problem
Author: John E. Davis
Date: Wed, 23 Feb 2000 00:00
Date: Wed, 23 Feb 2000 00:00
13 lines
1173 bytes
1173 bytes
On 23 Feb 2000 19:55:38 GMT, jwk <_hate_spam_thunder7@xs4all.nl> wrote: >But IMHO, if you use cygwin to compile it, it should be able to trap the >^C first one way and then another. If cygwin can do it, then it must be possible using native win32 calls. This means that mingw32 should be able to trap ^C using those same win32 calls. I will look more into when I find a bit of spare time. --John
Re: slrnpull win32 problem
Author: Hans Peter Holm
Date: Wed, 23 Feb 2000 00:00
Date: Wed, 23 Feb 2000 00:00
22 lines
1686 bytes
1686 bytes
John E. Davis wrote: > On 23 Feb 2000 14:32:00 GMT, David Gerard <fun@thingy.apana.org.au> > wrote: > >Is there anything I can do about this? Can a future version trap the first > >Ctrl-C and clean up properly, and take a *second* Ctrl-C as die-right-now? > >Do these questions make sense in this context? > I do not know enough about win32 to answer these questions. Perhaps > someone more knowlegable abount win32 and the winsock API will step in > here and indicate how one can interrupt a network read from a console > mode program. On Unix this is handled by setting SIGINT to interrupt > system calls. I hit Ctrl+Break in slrnpull, if the server or the connection dies. It works for me in both the OS/2 and Windows versions. - I haven't noticed any duplicate entries or odd behavior. -- Hans
Re: slrnpull win32 problem
Author: jwk
Date: Wed, 23 Feb 2000 00:00
Date: Wed, 23 Feb 2000 00:00
40 lines
2270 bytes
2270 bytes
On 23 Feb 2000 16:09:53 GMT, John E. Davis <davis@space.mit.edu> wrote: >On 23 Feb 2000 14:32:00 GMT, David Gerard <fun@thingy.apana.org.au> >wrote: >>Is there anything I can do about this? Can a future version trap the first >>Ctrl-C and clean up properly, and take a *second* Ctrl-C as die-right-now? >>Do these questions make sense in this context? > >I do not know enough about win32 to answer these questions. Perhaps >someone more knowlegable abount win32 and the winsock API will step in >here and indicate how one can interrupt a network read from a console >mode program. On Unix this is handled by setting SIGINT to interrupt >system calls. > >--John It depends on how the win32 version is compiled. There are two incarnations of the gcc-compiler under win32. mingw32 is lean and simple, and does not do any signals. cygwin32 is not so lean, but it does handle signals. It comes with complete compatibility libraries for unix-programs, and has been used for compiling for example the 'smbclient' program from the samba-suite under win32. YMMV, IIRC and all that, of course. But IMHO, if you use cygwin to compile it, it should be able to trap the ^C first one way and then another. Good luck, Jurriaan -- Spock: "Logic, logic, logic... Logic is the beginning of wisdom, Valeris, not the end." "STVI:TUC", Stardate 9522.6 Linux 2.3.46 SMP up 1:19 5 users load av: 0.20 0.17 0.10
Re: slrnpull win32 problem
Author: John E. Davis
Date: Wed, 23 Feb 2000 00:00
Date: Wed, 23 Feb 2000 00:00
15 lines
1260 bytes
1260 bytes
On 23 Feb 2000 14:32:00 GMT, David Gerard <fun@thingy.apana.org.au> wrote: >Is there anything I can do about this? Can a future version trap the first >Ctrl-C and clean up properly, and take a *second* Ctrl-C as die-right-now? >Do these questions make sense in this context? I do not know enough about win32 to answer these questions. Perhaps someone more knowlegable abount win32 and the winsock API will step in here and indicate how one can interrupt a network read from a console mode program. On Unix this is handled by setting SIGINT to interrupt system calls. --John
Re: slrnpull win32 problem
Author: David Gerard
Date: Thu, 24 Feb 2000 00:00
Date: Thu, 24 Feb 2000 00:00
39 lines
2727 bytes
2727 bytes
On 23 Feb 2000 21:50:56 GMT, Hans Peter Holm <hpholm@post1.tele.dk> wrote: :John E. Davis wrote: :> On 23 Feb 2000 14:32:00 GMT, David Gerard <fun@thingy.apana.org.au> :> wrote: :> >Is there anything I can do about this? Can a future version trap the first :> >Ctrl-C and clean up properly, and take a *second* Ctrl-C as die-right-now? :> >Do these questions make sense in this context? :> I do not know enough about win32 to answer these questions. Perhaps :> someone more knowlegable abount win32 and the winsock API will step in :> here and indicate how one can interrupt a network read from a console :> mode program. On Unix this is handled by setting SIGINT to interrupt :> system calls. :I hit Ctrl+Break in slrnpull, if the server or the connection dies. It :works for me in both the OS/2 and Windows versions. - I haven't noticed :any duplicate entries or odd behavior. For me, Ctrl-Break is doing the same as Ctrl-C - it dies immediately and does not clean up after itself in the currently-being-downloaded newsgroup. (I *think* what's happening is that it's failing to correctly update .minmax when you hit Ctrl-C. I could be wrong, though, and should investigate further.) Hmmm. Does what I'm asking for (an interrupt that says 'drop this connection, clean up after yourself and terminate) even exist in slrnpull? Or is there only the Ctrl-C, which says 'terminate RIGHT NOW'? -- http://xenu.netizen.com.au/ http://www.caube.org.au/ "It is more than possible to be a member of a sub-culture, a different and 'outside the box' thinker who's dealt with the hardships of being different and other people's scorn and *still* be an intolerant fuckwit." (Morgan Jaffit)
Re: slrnpull win32 problem
Author: John E. Davis
Date: Thu, 24 Feb 2000 00:00
Date: Thu, 24 Feb 2000 00:00
41 lines
2179 bytes
2179 bytes
On 24 Feb 2000 15:08:14 GMT, David Gerard <fun@thingy.apana.org.au>
wrote:
>Hmmm. Does what I'm asking for (an interrupt that says 'drop this
>connection, clean up after yourself and terminate) even exist in slrnpull?
>Or is there only the Ctrl-C, which says 'terminate RIGHT NOW'?
On Unix platforms, Ctrl-C activates a signal handler which causes the
proper cleanup activities to take place. I believe that the win32 API
contains a function called `SetConsoleCtrlHandler' that may be used
to emulate this behavior. That is, add
#v+
static BOOL WINAPI kbd_int_handler (DWORD type)
{
BOOL ret = TRUE;
switch (type)
{
case CTRL_C_EVENT: /* ctrl+c hit */
case CTRL_BREAK_EVENT: /* ctrl+break hit */
case CTRL_CLOSE_EVENT: /* window closing */
case CTRL_LOGOFF_EVENT: /* user logoff */
case CTRL_SHUTDOWN_EVENT: /* system shutdown */
default:
Terminate_Slrn_Pull_Requested = 1;
(void) handle_interrupts ();
}
return TRUE;
}
#v-
to the appropriate place in slrnpull.c and then put the line
#v+
SetConsoleCtrlHandler (kbd_int_handler, TRUE);
#v-
int the `init_signals' function:
You might try making these changes to slrnpull.c and test whether or
not they cause the appropriate actions to take place.
--John
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads