teemperor added inline comments.
================
Comment at: lldb/tools/lldb-server/lldb-platform.cpp:289
fprintf(stderr, "failed to create acceptor: %s", error.AsCString());
- exit(socket_error);
+ return -1;
}
----------------
clayborg wrote:
> Should we return error.GetError() if it is non zero? IIRC it will be the
> actual errno. And best to not return -1, just return 1.
>
> ```
> uint32_t SBError::GetError() const;
> ```
If we force the caller to convert errno to an exit code, then we could also
just return the `Status error` itself (and then the caller can just return 0/1
depending on success or error)? That seems more clear than returning `errno`
from a function with main signature (which makes it look like it would return
an exit code).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108351/new/
https://reviews.llvm.org/D108351
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits