Message ID | 20200524175319.9908-1-ayoub.zaki@embexus.com |
---|---|
State | Accepted |
Headers | show |
Series | _progress_ipc_connect: in case of reconnect option disabled return error instead of exit | expand |
On 24.05.20 19:53, Ayoub Zaki wrote: > Signed-off-by: Ayoub Zaki <ayoub.zaki@embexus.com> > --- > ipc/progress_ipc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/ipc/progress_ipc.c b/ipc/progress_ipc.c > index b4af883..110d6b3 100644 > --- a/ipc/progress_ipc.c > +++ b/ipc/progress_ipc.c > @@ -56,7 +56,8 @@ static int _progress_ipc_connect(const char *socketpath, bool reconnect) > } > if (!reconnect) { > fprintf(stderr, "cannot communicate with SWUpdate via %s\n", socketpath); > - exit(1); > + close(fd); > + return -1; > } > > usleep(10000); > Acked-by: Stefano Babic <sbabic@denx.de> Best regards, Stefano Babic
diff --git a/ipc/progress_ipc.c b/ipc/progress_ipc.c index b4af883..110d6b3 100644 --- a/ipc/progress_ipc.c +++ b/ipc/progress_ipc.c @@ -56,7 +56,8 @@ static int _progress_ipc_connect(const char *socketpath, bool reconnect) } if (!reconnect) { fprintf(stderr, "cannot communicate with SWUpdate via %s\n", socketpath); - exit(1); + close(fd); + return -1; } usleep(10000);
Signed-off-by: Ayoub Zaki <ayoub.zaki@embexus.com> --- ipc/progress_ipc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)