Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 10-01-2005, 08:49 AM   #1
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, 03:40 PM   #2
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 09:01 PM
Modem dont wat to be used!!!!! NoSpHeRaTu Linux - Newbie 3 11-16-2004 12:32 PM
Wat is OpenSSL Chiel Linux - Newbie 6 08-31-2004 02:45 PM
wat would you like to have done? zetsui Linux - Software 20 08-22-2003 02:11 PM
wat is sshd...? dejan_j Linux - General 8 05-14-2003 02:01 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:12 AM.

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