[MDEV-16084] Calling exit() from a signal handler is unsafe Created: 2018-05-03 Updated: 2018-05-03 Resolved: 2018-05-03 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Tests |
| Fix Version/s: | 10.0.36, 10.1.33, 10.2.15, 10.3.7 |
| Type: | Task | Priority: | Major |
| Reporter: | Vladislav Vaintroub | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
marko noticed a deadlock in safe_process, in exit() from a signal hander. Quoth the StackOverflow https://stackoverflow.com/a/8833602/547065 talking about async-signal-safe-functions in POSIX: "...you can see functions _Exit(), _exit() and abort(), but notably not exit(). So you shalt not call it from a signal handler." See also http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html
|