Skip to content

Commit c9ae970

Browse files
committed
execve: abort() on failure
Signed-off-by: Pavel Boldin <[email protected]>
1 parent 0c2a204 commit c9ae970

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/execve/execve.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ notify_listener(void)
8181
sock = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
8282
if (sock == -1) {
8383
dprintf("socket() error: %s(%d)\n", strerror(errno), errno);
84-
return;
84+
abort();
8585
}
8686
dprintf("socket()\n");
8787

@@ -96,7 +96,7 @@ notify_listener(void)
9696
if (rv == -1) {
9797
fprintf(stderr, "libcare-execve: connect() error: %s(%d)\n", strerror(errno), errno);
9898
(void) close(sock);
99-
return;
99+
abort();
100100
}
101101
dprintf("connect()\n");
102102

@@ -113,7 +113,7 @@ notify_listener(void)
113113
if (rv == -1) {
114114
fprintf(stderr, "send() error: %s(%d)\n", strerror(errno), errno);
115115
(void) close(sock);
116-
return;
116+
abort();
117117
}
118118
dprintf("send()\n");
119119

@@ -123,6 +123,7 @@ notify_listener(void)
123123

124124
if (rv == -1) {
125125
fprintf(stderr, "recv() error: %s(%d)\n", strerror(errno), errno);
126+
abort();
126127
}
127128
dprintf("recv()\n");
128129

0 commit comments

Comments
 (0)