ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

From what you have said it is impossible for anyone to tell you what the problem is.

A segmentation fault occurs when a program is trying to access memory it is not permitted to access. There are many ways in which this can happen.

Did you write the program yourself?
Did you compile it from provided source code?
Did you install it from a package manager?

To get a meaningful answer from this forum we would need to know about the lines in error. If you don't have the source then I suspect that a more productive approach would be to contact the developers.

Are you prepared to post the source code? Please do not just paste pages and pages of code into the forums - I'm asking the question if you are prepared to. Before answering you should probably review license terms for the software - is it legal to post the code in public?

If it's open source and that you can post the code, and you do post the code, you may find someone who will help you debug it. If not, I would recommend hiring a programmer with relevant experience to do it.

As I understand it pthread_setschedparam() is expecting a valid thread ID, which pthread_create() establishes. So a blind stab in the dark would be to switch those two lines around. Sorry not very convincing but might be worth a shot.