segmentation fault in a thread
Hi there,
After going throug a lot of info on the internet I have this question:
if I do a outb() in a thread I get a segmentation fault. ioperm() is in that routine. Is that due to the fact that the created thread doesn't run under root? And is that normal? If I understand correctly child processes with fork() run under another user, but pthread runs under the same user (root).
Or is this not correct.
My program has now 3 parts: the main program does the file i/o work and has a timer interrupt routine (sigalrm) which triggers a thread that handles all time related things and a 3rd one which does the i/o to the par.port where the a/d converter is connected.
The latest routine now gives the seg.fault. It worked when the par.port i/o was in the main program, but then I had other problems.
Can anybody help me with this?
|