LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-01-2005, 07:49 AM   #1
9488
LQ Newbie
 
Registered: Aug 2005
Posts: 8

Rep: Reputation: 0
wat does <sys/types.h> mean?


What does it mean?
#include <sys/types.h> is used to create file?

pid_t fork (void)
is it used to create a process?
 
Old 10-01-2005, 02:40 PM   #2
CSIXTY4
LQ Newbie
 
Registered: Mar 2004
Location: Lombard, IL.
Distribution: SUSE 9.0 & Fedora Core 2
Posts: 21

Rep: Reputation: 15
#include is called a pre-processor directive. When you compile a C or C++ program, one of the first things it does is use a "pre-processor" to look for lines starting with # characters and take care of them. The #include directive inserts the contents of another file into that spot in the source code. Usually this is a "header" file (.h extension) that defines variable types or functions. Since the included file's name is surrounded by < and >, it means it's located in the standard include path, and not with the rest of the source files. If it were with the rest of the source files, there would be quotes around it (#include "types.h") instead. The "sys/" part means there's a "sys" directory where the standard header files are, and types.h can be found there.

fork() is used to spawn off a new process, yes. But I'd suggest getting a little more familiar with the rest of the language before you start messing with it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is a Linux sys w/o any passwd's as secure as a microsoft windows sys w/no passwd? t3gah Linux - Security 4 04-22-2005 08:01 PM
Modem dont wat to be used!!!!! NoSpHeRaTu Linux - Newbie 3 11-16-2004 11:32 AM
Wat is OpenSSL Chiel Linux - Newbie 6 08-31-2004 01:45 PM
wat would you like to have done? zetsui Linux - Software 20 08-22-2003 01:11 PM
wat is sshd...? dejan_j Linux - General 8 05-14-2003 01:01 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration