Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Problems with Cthreads
@ 1996-04-29  4:00 J.J. Perez Segado
  0 siblings, 0 replies; only message in thread
From: J.J. Perez Segado @ 1996-04-29  4:00 UTC (permalink / raw)



Dear all,

        I am working with a Cthread library on a machine with MACH and OSF.
When I try execute a simple program as a normal user the system returns me an 
error (Bad system call(core dumped)) but if I execute it as root the program 
executes well.

example:

#include <cthreads.h>
#include <stdio.h>

void prueba()
{
        printf("This is a test\n");
        cthread_exit(0);
}

void main()
{
        cthread_join(cthread_fork((void *) prueba, NULL));
        exit(0);
}

I compile it with:

     gcc -Wall -D_DEBUG -g -D_REENTRANT prueba.c -L. -lcthreads -lmach -o prueba

I execute it as a simple user and the out is:
        Bad system call (core dumped)
I execute it as root and the out is:
        This is a test

Why? only the root can do MACH calls (mach_task_self, ...)? 
How can I solve it? (I don't want to give root permisions for any user)

thanks in advance,

  ____________________________________________________________________
        Juan Jos'e P'erez Segado / DATSI         Voice: +34 1 336 7450
        Facultad de Informatica / UPM            Alter: +34 1 336 7376
        E-28660 Boadilla del Monte                 Fax: +34 1 336 7373
        Madrid, SPAIN           E-mail: jsegado@laurel.datsi.fi.upm.es
        WWW page:  http://laurel.datsi.fi.upm.es/~jsegado/jsegado.html



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-04-29  4:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-04-29  4:00 Problems with Cthreads J.J. Perez Segado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox