diff --git a/src/platforms/posix/px4_layer/px4_posix_tasks.cpp b/src/platforms/posix/px4_layer/px4_posix_tasks.cpp index 1f18a46d98..d482dc7662 100644 --- a/src/platforms/posix/px4_layer/px4_posix_tasks.cpp +++ b/src/platforms/posix/px4_layer/px4_posix_tasks.cpp @@ -176,6 +176,7 @@ px4_task_t px4_task_spawn_cmd(const char *name, int scheduler, int priority, int if (stack_size < PTHREAD_STACK_MIN) { stack_size = PTHREAD_STACK_MIN; } + rv = pthread_attr_setstacksize(&attr, stack_size); if (rv != 0) {