... I/O
B
CPROGRAMMERS ON GNU /LINUX HAVE TWO SETS OF INPUT/OUTPUT functions at
their disposal.The standard C library provides I/O functions: printf, fopen, and so
on.
1
The Linux kernel itself provides ... descriptor may cause Linux to take a particular action, depending on
the nature of the file descriptor. For example, when you close a file descriptor for a
network socket, Linux closes...
... returns, the
thread exits. On GNU /Linux, thread functions take a single parameter, of type void*,
and have a void* return type.The parameter is the thread argument: GNU /Linux passes
the value along ... same memory space, thread-specific data may not be
accessed using normal variable references. GNU /Linux provides special functions for
setting and retrieving values from the thread-specifi...
... 277
Other Development Tools
A
DEVELOPING CORRECT, FAST C OR C++ GNU /LINUX PROGRAMS requires more
than just understanding the GNU /Linux operating system and its system calls. In this
appendix, we ... determine the currently
executing function.These samples determine function execution times. Because
Linux s clock ticks are 0.01 seconds apart, these interruptions occur, at most, every
0.01...
... following:
% man 7 signal
Table C.1 Linux Signals
Name Description
SIGHUP Linux sends a process this signal when it becomes disconnected
from a terminal. Many Linux programs use
SIGHUP for an ... in
/usr/include/sys/signum.h, which is included as part of <signal.h>.
For a full list of Linux signals, including a short description of each and the default
behavior when the signal...
... VISIT ON THE INTERNET to learn more about
programming for the GNU /Linux system.
D.1 General Information
n
http://www.advancedlinuxprogramming.com is this book’s home on the
Internet. Here, you ... information about pro-
gramming GNU /Linux. The same information can also be found at
http://www.newriders.com.
n
http://www.linuxdoc.org is the home of the Linux Documentation Project.
This sit...
... 5/22/01 10:19 AM Page 15
02 0430 CH01 5/22/01 10:19 AM Page 16
Advanced UNIX Programming
with Linux
I
1 Getting Started
2 Writing Good GNU /Linux Software
3 Processes
4 Threads
5 Interprocess Communication
01 ... page is outdated.
To help you navigate, here are the most useful sources of information about
advanced Linux programming.
6. Some people have commented that saying break mai...
... GNU /Linux system in certain ways. GNU/
Linux provides other ways for interacting with the operating environment, too.
03 0430 CH02 5/22/01 10:20 AM Page 17
36
Chapter 2 Writing Good GNU /Linux ... guidelines presented, you’ll be able to write programs that
work well within the GNU /Linux environment and meet GNU /Linux users’ expec-
tations of how programs should operate.
2.1 Interacti...
... the Hood 111
Smarty Control Structures 111
Smarty Functions and More 114
Caching with Smarty 117
Advanced Smarty Features 118
Writing Your Own Template Solution 120
Further Reading 121
5 Implementing ... they approach problem solving. Initially
the simple solution dominates because you are not yet advanced enough to understand
the more complex principles required for anything else. As you...