gracefully fail if d-modem helper cannot be launched
This commit is contained in:
parent
1aed143ceb
commit
9613917cf4
1 changed files with 6 additions and 1 deletions
|
@ -635,7 +635,12 @@ static int socket_start (struct modem *m)
|
|||
char str[16];
|
||||
snprintf(str,sizeof(str),"%d",sockets[0]);
|
||||
close(sockets[1]);
|
||||
execl(modem_exec,modem_exec,m->dial_string,str,NULL);
|
||||
ret = execl(modem_exec,modem_exec,m->dial_string,str,NULL);
|
||||
if (ret == -1) {
|
||||
ERR("prog: %s\n", modem_exec);
|
||||
perror("execl");
|
||||
exit(-1);
|
||||
}
|
||||
} else {
|
||||
close(sockets[0]);
|
||||
dev->fd = sockets[1];
|
||||
|
|
Loading…
Reference in a new issue