Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: jsegado@laurel.datsi.fi.upm.es (J.J. Perez Segado)
Subject: Problems with Cthreads
Date: 1996/04/29	[thread overview]
Message-ID: <4m2m6v$q7m@panoramix.fi.upm.es> (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



                 reply	other threads:[~1996-04-29  4:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

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