From e5360e0611be0cba2bef7fda687fe8efdee2b72a Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 8 Oct 2016 10:04:29 -0700 Subject: 3477 --- 091socket.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to '091socket.cc') diff --git a/091socket.cc b/091socket.cc index b5afa26c..91d574e6 100644 --- a/091socket.cc +++ b/091socket.cc @@ -55,6 +55,11 @@ case _OPEN_SERVER_SOCKET: { socket_t* server_socket(int portno) { socket_t* result = new socket_t; result->fd = socket(AF_INET, SOCK_STREAM, 0); + if (result->fd < 0) { + raise << "Failed to create server socket.\n" << end(); + delete result; + return NULL; + } int dummy = 0; setsockopt(result->fd, SOL_SOCKET, SO_REUSEADDR, &dummy, sizeof(dummy)); result->addr.sin_family = AF_INET; -- cgit 1.4.1-2-gfad0 ptgroup label='branches'> mirror of ranger - a simple, vim-like file managerakspecs <akspecs@tilde.institute>
summary refs log tree commit diff stats
path: root/ranger/gui/ui.py
blob: 2abf89393915fcfa7d46618cbefa33fcdb076091 (plain) (blame)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74