pussuw commented on PR #6248: URL: https://github.com/apache/incubator-nuttx/pull/6248#issuecomment-1124843504
> > > I was thinking that we can rename `lib_exit.c` in this PR, but as you have more context I assume that not. I'm fine with temporary rename > > > > > > Spec define two api(_exit and _Exit): https://pubs.opengroup.org/onlinepubs/007904875/functions/exit.html we have to keep both. > > Yes. But can we place implementation for both `_exit` and `_Exit` in same `lib_exit.c`? No, _Exit() is just a redirection to _exit(): - _exit() is the unistd / posix standard function, lives in unistd.h and its implementation is in the kernel. - _Exit() is the stdlib version of _exit(). They are literally the same function, but we need to implement both. Movin _exit() to libc/lib_exit.c is not possible, _exit() is a system call (it lives in the kernel). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
