A question for Rule21.8

Moderators: misra-c, david ward

Post Reply
tsukukazu
Posts: 3
Joined: Tue Apr 01, 2014 8:43 am
Company: Furukawa Electric Co., LTD.

A question for Rule21.8

Post by tsukukazu » Mon Jul 14, 2014 7:28 am

Hello.

I have a question about rule 21.8.

_Exit Function that were added in C99 also has implementation-defined behavior.

Is this not included?

Best regards,
Kazuhiro Tsukushiro

misra-c
Posts: 561
Joined: Thu Jan 05, 2006 1:11 pm

Re: A question for Rule21.8

Post by misra-c » Mon Aug 11, 2014 8:30 am

It was a conscious decision not to include _Exit in this rule. _Exit() differs from exit() in that no atexit-registered handlers are called prior to program termination. This means that the undefined behaviour that can occur with exit() isn't possible with _Exit().

The implementation-defined behaviour remains a possibility (e.g. the status code returned to the environment, whether temporary files are deleted or not, whether streams are flushed and/or closed) but this was considered not to be a strong enough reason to ban _Exit().
---
Posted by and on behalf of
the MISRA C Working Group

Post Reply

Return to “8.21 Standard libraries”