SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Click Here to receive this Complete Guide absolutely free.
Just for comparison, I have no problems viewing it here at work with a Windows XP box, and it uses around 50MB of RAM according to Windows Task Manager.
It might be worth saving it, converting it to postscript (pdf2ps the_file.pdf that_file.ps) and then back to pdf (ps2pdf that_file.ps that_new_file.pdf), and if there's some sort of problem with the pdf itself, that will probably wipe it out.
I downloaded the pdf and ran pdf2ps on it, and got loads of this sort of error:
**** Warning: Fonts with Subtype = /TrueType should be embedded.
But TimesNewRomanPSMT is not embedded.
What I think is pretty funny is the next bit it spat out:
**** This file had errors that were repaired or ignored.
**** The file was produced by:
**** >>>> Acrobat Distiller 7.0 (Windows) <<<<
**** Please notify the author of the software that produced this
**** file that it does not conform to Adobe's published PDF
I then turned the postscript that produced, back into a pdf, but as H_TeXMeX_H noted, there's something very odd going on on page 3. Perhaps you could email the people who host the file and let them know?
I am working on a code where I want to fork more processes which will all make its own role in the program.
int child1, child2, child3 ...
child1 = fork();... calls the refresh function for example...
child2 = fork();... calls the virtualSpace function ...
and so on...
the functions should run in the same time and if the kill state is received all should make their end processes and the whole program terminate...
I was trying define some global variables (kill, processStatus1) but even if I declare in the main -> kill =1; the childs dose note see this state value.
Here comes the above site I thought that I can do that with pointers (the chapter on this pdf is about pointers).
I was wrong. Can you help me to solve my problem?
anyway i think i can give you some pointers:
- man 2 fork !!
- are you sure that you even need different processes? what about objects?
- ever heard of exceptions?
- don't use int for statuses. either use a more descriptive name and use bool or use your own datatype
- use an array or even better a vector for the childs
- global variables are the square root of evil and should be avoided (unless needed)
- man 2 exit_group?
I know a good way to know when you need a global variable. First make it local, then after you finish the program (or once you realize the following), if you tend to pass a certain variable to a lot of functions (like the majority of them), then it should be global. You might also want to consider 'static' global.