pthread_atfork(): Change to behavior from FACE Technical Standard

Closes #4713.
This commit is contained in:
Joel Sherrill
2022-09-02 12:42:08 -05:00
parent 9ec9be834d
commit dbba943044
3 changed files with 14 additions and 11 deletions

View File

@@ -104,9 +104,15 @@ void *POSIX_Init(
sc = fork();
check_enosys( sc );
puts( "pthread_atfork -- ENOSYS" );
/*
* The behavior of pthread_atfork() in single process environments was
* undefined by POSIX but the fACE Technical Standard required returning
* 0. Before ticket #4713, this did return ENOSYS. Just leaving this test
* case here for convenience.
*/
puts( "pthread_atfork -- 0" );
sc = pthread_atfork( NULL, NULL, NULL );
check_enosys( sc );
rtems_test_assert( !sc );
puts( "pthread_getcpuclockid -- ENOSYS" );
sc = pthread_getcpuclockid( 0, NULL );

View File

@@ -9,7 +9,7 @@ execv -- ENOSYS
execve -- ENOSYS
execvp -- ENOSYS
fork -- ENOSYS
pthread_atfork -- ENOSYS
pthread_atfork -- 0
pthread_getcpuclockid -- ENOSYS
sched_setparam -- ENOSYS
sched_getparam -- ENOSYS