File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,10 +67,6 @@ struct XenomaiApp : RtapiApp {
6767 int nprocs = sysconf ( _SC_NPROCESSORS_ONLN );
6868 CPU_SET (nprocs-1 , &cpuset); // assumes processor numbers are contiguous
6969
70- fprintf (stderr,
71- " Start. getuid()=%d geteuid()=%d\n " ,
72- getuid (), geteuid ());
73-
7470 int ret;
7571 pthread_attr_t attr;
7672 if ((ret = pthread_attr_init (&attr)) != 0 )
@@ -96,15 +92,14 @@ struct XenomaiApp : RtapiApp {
9692 auto task = reinterpret_cast <RtaiTask*>(arg);
9793 pthread_setspecific (key, arg);
9894
99- fprintf (stderr,
100- " Wrapper. getuid()=%d geteuid()=%d\n " ,
101- getuid (), geteuid ());
102-
103- /* Attach to the core. */
104- rtapi_print (" linuxcnc-thread:%d\n " , gettid ());
105- int tfd = evl_attach_self (" linuxcnc-thread:%d" , gettid ());
106- if (tfd < 0 ){
107- rtapi_print (" evl_attach_self() failed ret %i errno %i\n " , tfd, errno);
95+ {
96+ WithRoot r;
97+ /* Attach to the core. */
98+ rtapi_print (" linuxcnc-thread:%d\n " , gettid ());
99+ int tfd = evl_attach_self (" linuxcnc-thread:%d" , gettid ());
100+ if (tfd < 0 ){
101+ rtapi_print (" evl_attach_self() failed ret %i errno %i\n " , tfd, errno);
102+ }
108103 }
109104
110105 struct timespec now;
You can’t perform that action at this time.
0 commit comments