pussuw commented on code in PR #6197: URL: https://github.com/apache/incubator-nuttx/pull/6197#discussion_r864681160
########## sched/task/exit.c: ########## @@ -53,24 +53,24 @@ void _exit(int status) { - up_exit(status); + up_exit(status & 0xff); } /**************************************************************************** - * Name: exit + * Name: nxtask_exit_cleanup * * Description: - * The exit() function causes normal process termination and the value of - * status & 0377 to be returned to the parent. + * Perform cleanup before task is closed. * - * All functions registered with atexit() and on_exit() are called, in the - * reverse order of their registration. + * If SCHED_ATEXIT or SCHED_ONEXIT are defined, all functions registered + * with atexit() and on_exit() are called, in the reverse order of their + * registration. * * All open streams are flushed and closed. * ****************************************************************************/ -void exit(int status) +void nxtask_exit_cleanup(int status) Review Comment: Bah, this does not quite work. The task gets wiped by this and trying to return from syscall fails. -- 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: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org