https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=249469
--- Comment #3 from Alex S <iwt...@gmail.com> --- (In reply to Edward Tomasz Napierala from comment #2) % cat sched.c #define _GNU_SOURCE #include <assert.h> #include <pthread.h> #include <sched.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <sys/types.h> #include <sys/time.h> #include <sys/resource.h> void* thread_start(void* arg) { return 0; } int main() { { pthread_attr_t attr; assert(pthread_attr_init(&attr) == 0); assert(pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED) == 0); pthread_t t; int err = pthread_create(&t, &attr, &thread_start, NULL); if (err != 0) { fprintf(stderr, "pthread_create: %s\n", strerror(err)); } pthread_attr_destroy(&attr); } { struct sched_param p; p.sched_priority = 0; if (sched_setscheduler(0, SCHED_RESET_ON_FORK, &p) == -1) { perror("sched_setscheduler"); } } { struct rlimit rl; int err = getrlimit(RLIMIT_RTTIME, &rl); if (err == -1) { perror("rlimit"); } } return 0; } % /compat/linux/bin/gcc sched.c -pthread -o sched % ./sched pthread_create: Operation not permitted sched_setscheduler: Invalid argument rlimit: Invalid argument -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-emulation@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-emulation To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"