您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 综合/其它 > linux高级程序设计
AdvancedLinuxProgrammingContentsAtaGlanceIAdvancedUNIXProgrammingwithLinux1GettingStarted32WritingGoodGNU/LinuxSoftware173Processes454Threads615InterprocessCommunication95IIMasteringLinux6Devices1297The/procFileSystem1478LinuxSystemCalls1679InlineAssemblyCode18910Security19711ASampleGNU/LinuxApplication219IIIAppendixesAOtherDevelopmentTools259BLow-LevelI/O281CTableofSignals301DOnlineResources303EOpenPublicationLicenseVersion1.0305FGNUGeneralPublicLicense309000430FM5/22/012:32PMPagei000430FM5/22/012:32PMPageiiAdvancedLinuxProgramming201West103rdStreet,Indianapolis,Indiana46290AnImprintofPearsonEducationBoston•Indianapolis•London•Munich•NewYork•SanFranciscoMarkMitchell,JeffreyOldham,andAlexSamuel:32PMPageiiiPublisherDavidDwyerAssociatePublisherAlValvanoExecutiveEditorStephanieWallManagingEditorGinaBrownAcquisitionsEditorAnnQuinnDevelopmentEditorLauraLoveallProductMarketingManagerStephanieLaytonPublicityManagerSusanPetroProjectEditorCarolineWiseCopyEditorKristaHansingSeniorIndexerCherylLenserManufacturingCoordinatorJimConwayBookDesignerLouisaKlucznikCoverDesignerBrainstormDesign,Inc.CoverProductionArenHowellProofreaderDebraNeelCompositionAmyParkerAdvancedLinuxProgrammingCopyright©2001byNewRidersPublishingFIRSTEDITION:June,2001Allrightsreserved.Nopartofthisbookmaybereproducedortransmittedinanyformorbyanymeans,electronicormechanical,includingphotocopying,recording,orbyanyinformationstorageandretrievalsystem,withoutwrittenpermissionfromthepublisher,exceptfortheinclusionofbriefquotationsinareview.InternationalStandardBookNumber:0-7357-1043-0LibraryofCongressCatalogCardNumber:00-10534305040302017654321Interpretationoftheprintingcode:Therightmostdouble-digitnumberistheyearofthebook’sprinting;theright-mostsingle-digitnumberisthenumberofthebook’sprinting.Forexample,theprintingcode01-1showsthatthefirstprintingofthebookoccurredin2001.ComposedinBemboandMCPdigitalbyNewRidersPublishing.PrintedintheUnitedStatesofAmerica.TrademarksAlltermsmentionedinthisbookthatareknowntobetrademarksorservicemarkshavebeenappropriatelycapital-ized.NewRidersPublishingcannotattesttotheaccuracyofthisinformation.Useofaterminthisbookshouldnotberegardedasaffectingthevalidityofanytrademarkorservicemark.PostScriptisatrademarkofAdobeSystems,Inc.LinuxisatrademarkofLinusTorvalds.WarningandDisclaimerThisbookisdesignedtoprovideinformationaboutAdvancedLinuxProgramming.Everyefforthasbeenmadetomakethisbookascompleteandasaccurateaspossible,butnowarrantyorfitnessisimplied.Theinformationisprovidedonanas-isbasis.TheauthorsandNewRidersPublishingshallhaveneitherliabilitynorresponsibilitytoanypersonorentitywithrespecttoanylossordamagesarisingfromtheinformationcontainedinthisbookorfromtheuseofthediscsorprogramsthatmayaccompanyit.000430FM5/22/012:32PMPageiv000430FM5/22/012:32PMPagevTableofContentsIAdvancedUNIXProgrammingwithLinux11GettingStarted31.1EditingwithEmacs41.2CompilingwithGCC61.3AutomatingtheProcesswithGNUMake91.4DebuggingwithGNUDebugger(GDB)111.5FindingMoreInformation132WritingGoodGNU/LinuxSoftware172.1InteractionWiththeExecutionEnvironment172.2CodingDefensively302.3WritingandUsingLibraries363Processes453.1LookingatProcesses453.2CreatingProcesses483.3Signals523.4ProcessTermination554Threads614.1ThreadCreation624.2ThreadCancellation694.3Thread-SpecificData724.4SynchronizationandCriticalSections774.5GNU/LinuxThreadImplementation924.6ProcessesVs.Threads94000430FM5/22/012:32PMPagevi5InterprocessCommunication955.1SharedMemory965.2ProcessesSemaphores1015.3MappedMemory1055.4Pipes1105.5Sockets116IIMasteringLinux1276Devices1296.1DeviceTypes1306.2DeviceNumbers1306.3DeviceEntries1316.4HardwareDevices1336.5SpecialDevices1366.6PTYs1426.7ioctl1447The/procFileSystem1477.1ExtractingInformationfrom/proc1487.2ProcessEntries1507.3HardwareInformation1587.4KernelInformation1607.5Drives,Mounts,andFileSystems1617.6SystemStatistics1658LinuxSystemCalls1678.1Usingstrace1688.2access:TestingFilePermissions1698.3fcntl:LocksandOtherFileOperations1718.4fsyncandfdatasync:FlushingDiskBuffers1738.5getrlimitandsetrlimit:ResourceLimits1748.6getrusage:ProcessStatistics1758.7gettimeofday:Wall-ClockTime176viiContents000430FM5/22/012:32PMPagevii8.8ThemlockFamily:LockingPhysicalMemory1778.9mprotect:SettingMemoryPermissions1798.10nanosleep:High-PrecisionSleeping1818.11readlink:ReadingSymbolicLinks1828.12sendfile:FastDataTransfers1838.13setitimer:SettingIntervalTimers1858.14sysinfo:ObtainingSystemStatistics1868.15uname1879InlineAssemblyCode1899.1WhentoUseAssemblyCode1909.2SimpleInlineAssembly1919.3ExtendedAssemblySyntax1929.4Example1949.5OptimizationIssues1969.6MaintenanceandPortabilityIssues19610Security19710.1UsersandGroups19810.2ProcessUserIDsandProcessGroupIDs19910.3FileSystemPermissions20010.4RealandEffectiveIDs20510.5AuthenticatingUsers20810.6MoreSecurityHoles21111ASampleGNU/LinuxApplication21911.1Overview21911.2Implementation22111.3Modules23911.4UsingtheServer25211.5FinishingUp255viiiContents000430FM5/22/012:32PMPageviiiIIIAppendixes257AOtherDevelopmentTools259A.1
本文标题:linux高级程序设计
链接地址:https://www.777doc.com/doc-4210863 .html