about summary refs log tree commit diff
path: root/sysdeps/mach/hurd/getentropy.c
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2023-04-29 16:13:51 +0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-04-29 16:53:47 +0200
commit41aac872341fbf70f3b7006ef266eb02a354a993 (patch)
tree295d9bd4b7ca177d0e4a4022a6f076b5b63fdfbd /sysdeps/mach/hurd/getentropy.c
parenta9fb57105e9abd7919478226ee802270d1b3b9df (diff)
downloadglibc-41aac872341fbf70f3b7006ef266eb02a354a993.tar.gz
glibc-41aac872341fbf70f3b7006ef266eb02a354a993.tar.xz
glibc-41aac872341fbf70f3b7006ef266eb02a354a993.zip
hurd: Make _exit work during early boot-up
If any of the early boot-up tasks calls exit () or returns from main (),
terminate it properly instead of crashing on trying to dereference
_hurd_ports and getting forcibly terminated by the kernel.

We sadly cannot make the __USEPORT macro do the check for _hurd_ports
being unset, because it evaluates to the value of the expression
provided as the second argument, and that can be of any type; so there
is no single suitable fallback value for the macro to evaluate to in
case _hurd_ports is unset. Instead, each use site that wants to care for
this case will have to do its own checking.

Checked on x86_64-gnu.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Message-Id: <20230429131354.2507443-4-bugaevc@gmail.com>
Diffstat (limited to 'sysdeps/mach/hurd/getentropy.c')
0 files changed, 0 insertions, 0 deletions