... infoMany GNU /Linux programs come with documentation in plain text or HTML formats as well.Happy GNU /Linux programming! 13 0430 CH11 5/22/01 10:46 AM Page 256 244Chapter 11 A Sample GNU /Linux ApplicationWhile ... theclient displays the current time.11.3.2 Show the GNU /Linux DistributionThe issue.somodule (see Listing 11.7) displays information about the GNU /Linux distribution running on the server.This information ... UNIX Network Programming, Volume 1: Networking APIs—Sockets and XTI,by W. Richard Stevens (Prentice Hall, 1997), for more information.1.The most popular open source Web server for GNU /Linux is the...
... 272 Other Development ToolsADEVELOPING CORRECT, FAST C OR C++ GNU /LINUX PROGRAMS requires morethan just understanding the GNU /Linux operating system and its system calls. In thisappendix, we ... erroneous programming constructions. Byeliminating such constructions, you’ll reduce the risk of program bugs, and you’ll findit easier to compile your programs on different GNU /Linux variants ... dynamic memory error, use mtrace during initialdevelopment.The program is available on all GNU /Linux systems and has been welltested. After ensuring that the number of allocations and deallocations...
... descriptor may cause Linux to take a particular action, depending onthe nature of the file descriptor. For example, when you close a file descriptor for anetwork socket, Linux closes the network ... the filedescriptor, Linux automatically expands the file to make room for the new data. If youposition a file descriptor beyond the end of a file and then write to it, Linux firstexpands the ... Notepad, displayall the text in a GNU /Linux text file on a single line because they expect a carriage return at the end ofeach line. Other programs for both GNU /Linux and Windows that process text...
... kill command.SIGCHLD Linux sends a process this signal when a child process exits. SeeSection 3.4.4,“Cleaning Up Children Asynchronously,” inChapter 3,“Processes.”SIGXCPU Linux sends a process ... signal at alater time. See Section 8.13, “setitimer: Setting Interval Timers,”in Chapter 8, Linux System Calls,” for information aboutsetitimer, a generalized version of alarm.SIGTERM This ... 302Appendix C Table of SignalsSIGINT Linux sends a process this signal when the user tries to end it bypressing Ctrl+C.SIGILL A process...
... forGNU /Linux. This site is one of the best places to stay abreast of the newestreleases of GNU /Linux software, from core system components to moreobscure, specialized applications.mhttp://www.linuxsecurity.com ... message.nhttp://www.kernel.org is the primary site for distribution of the Linux kernelsource code. For the trickiest and most technically detailed questions about how Linux works, the source code is the best place to ... theDocumentation directory for explanation of the kernel internals.nhttp://www.linuxhq.com also distributes Linux kernel sources, patches, andrelated information.nhttp://gcc.gnu.org is the...
... main.o reciprocal.o02 0430 CH01 5/22/01 10:19 AM Page 10 Advanced UNIX Programming with Linux I1 Getting Started2 Writing Good GNU /Linux Software3 Processes4 Threads5 Interprocess Communication01 ... 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 main is a little bit funny ... complication of C++ programming. We also assume that you know how toperform basic operations in the Linux command shell, such as creating directories andcopying files. Because many Linux programmers...
... 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 22Chapter 2 Writing Good GNU /Linux ... <unistd.h>continues03 0430 CH02 5/22/01 10:20 AM Page 35 Writing Good GNU /Linux Software2THIS CHAPTER COVERS SOME BASIC TECHNIQUES THAT MOST GNU /Linux program-mers use. By following the guidelines presented, ... guidelines presented, you’ll be able to write programs thatwork well within the GNU /Linux environment and meet GNU /Linux users’ expec-tations of how programs should operate.2.1 Interaction With...
... special typesig_atomic_t. Linux guarantees that assignments to variables of this type are per-formed in a single instruction and therefore cannot be interrupted midway. In Linux, sig_atomic_t is ... in Chapter 5,“Interprocess Communication,” but fortunately Linux does this for you, using signals.When a child process terminates, Linux sends the parent process the SIGCHLD signal.The default ... Processes3.2.3 Process Scheduling Linux schedules the parent and child processes independently; there’s no guarantee ofwhich one will run first, or how long it will run before Linux interrupts it and...
... created.For most GNU /Linux application programming tasks, only one thread attribute istypically of interest (the other available attributes are primarily for specialty real-time programming) .This ... returns, thethread 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 passesthe value along ... instructions following the call. Meanwhile, the new thread begins executingthe thread function. Linux schedules both threads asynchronously, and your programmust not rely on the relative order...
... other processes.If you don’t specify this flag, Linux may buffer writes before transferring them to the file.Alternatively, you can force Linux to incorporate buffered writes into the disk ... specifies where in your process’s addressspace you want to map the shared memory; if you specify NULL, Linux will choosean available address.The third argument is a flag, which can include the following:nSHM_RND ... programs, this is more convenient and mayalso run faster than explicit file I/O operations.One advanced and powerful technique used by some programs is to build datastructures (ordinary struct...