File: 530_move_interrupt_handler.diff

package info (click to toggle)
netkit-ftp-ssl 0.17.34%2Breally0.17-1
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 2,724 kB
  • sloc: ansic: 6,606; makefile: 36; sh: 13
file content (37 lines) | stat: -rw-r--r-- 881 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Description: Install interrupt handler before initializing SSL
  Origin unknown, comes from netkit-ftp-ssl 0.17.12+0.2-6 or earlier
Forwarded: no
Last-Update: 2010-04-07

--- a/ftp/main.c
+++ b/ftp/main.c
@@ -354,6 +354,14 @@
 		homedir[sizeof(homedir)-1] = 0;
 		home = homedir;
 	}
+	/*
+	 * We need this since we want to return from unsafe library calls ASAP
+	 * when a SIGINT happens.
+	 */
+	siginterrupt(SIGINT, 1);
+	toplevel = &jmploc;
+	obstack_init(&mainobstack);
+	obstack_init(&lineobstack);
 
 #ifdef USE_SSL
         if (ssl_enabled) {
@@ -366,14 +374,6 @@
 	}
 #endif /* USE_SSL */
 
-	/*
-	 * We need this since we want to return from unsafe library calls ASAP
-	 * when a SIGINT happens.
-	 */
-	siginterrupt(SIGINT, 1);
-	toplevel = &jmploc;
-	obstack_init(&mainobstack);
-	obstack_init(&lineobstack);
 	if (argc > 0) {
 		if (sigsetjmp(jmploc, 1))
 			exit(0);