Bugfixesandchangesin4.2BSD July28,1983 SamuelJ.Leffler ComputerSystemsResearchGroup DepartmentofElectricalEngineeringandComputerScience UniversityofCalifornia,Berkeley Berkeley,California94720 (415)642-7780 ABSTRACT ThisdocumentdescribesbrieflythechangesintheBerkeleysystemforthe VAXbetweenthe4.1BSDdistributionofApril1981andthis,itsrevisionofJuly 1983.Itattemptstosummarize,withoutgoingintogreatdetail,thechanges whichhavebeenmade. Notableimprovements •Thefilesystemorganizationhasbeenredesignedtoprovideatleastanorderofmagnitude improvementindiskbandwidth. •ThesystemnowprovidesfullsupportfortheDODStandardTCP/IPnetworkcommunicationprotocols.Thissupporthasbeenintegratedintothesysteminamannerwhichallows thedevelopmentandconcurrentuseofothercommunicationprotocols.Hardwaresupport androutinghavebeenisolatedfromtheprotocolstoallowsharingbetweenvaryingnetwork architectures.Softwaresupportisprovidedfor10differenthardwaredevicesincluding3different10Mb/sEthernetmodules. •Anewsetofinterprocesscommunicationfacilitieshasreplacedtheoldmultiplexedfile mechanism.Thesenewfacilitiesallowunrelatedprocessestoexchangemessagesineithera connection-orientedorconnection-lessmanner.Theinterprocesscommunicationfacilities havebeenintegratedwiththenetworkingfacilities(describedabove)toprovideasingleuser interfacewhichmaybeusedinconstructingapplicationswhichoperateononeormore machines. •Anewsignalpackagewhichcloselymodelsthehardwareinterruptfacilitiesfoundonthe VAXreplacestheoldsignalsandjobslibraryof4.1BSD.Thenewsignalpackageprovides forautomaticmaskingofsignals,sophisticatedsignalstackmanagement,andreliableprotectionofcriticalregions. •Filenamesarenowalmostarbitrarylength(upto255characters)andanewfiletype,symboliclink,hasbeenadded.Symboliclinksprovidea‘‘symbolicreferencing’’mechanismsimilartothatfoundinMultics.Theyareinterpolatedduringpathnameexpansionandallow userstocreatelinkstofilesanddirectorieswhichspanfilesystems. •Thesystemsupportsadvisorylockingonfiles.Filescanhave‘‘shared’’or‘‘exclusive’’locks appliedbyprocesses.Multipleprocessesmayapplysharedlocks,butonlyoneprocessat anytimemayhaveanexclusivelockonafile.Further,whenanexclusivelockispresenton afile,sharedlocksaredisallowed.Lockingrequestsnormallyblockaprocessuntiltheycan -2-becompleted,ortheymaybeindicatedas‘‘non-blocking’’inwhichcaseanerrorisreturned ifthelockcannotbeimmediatelyobtained. •Thegroupidentifiernotionhasbeenextendedtoa‘‘groupset’’.Whenuserslogintothe systemtheyareplacedinalltheirgroups.Accesscontrolisnowdonebasedonthegroup setratherthanjustasinglegroupid.Thishasobviatedtheneedforthenewgrpcommand. •Per-user,per-filesystemdiskquotasarenowpartofthesystem.Softandhardlimitsmay bespecifiedonaperuserandperfilesystembasistocontrolthenumberoffilesandamount ofdiskspaceallocatedtoauser.Userswhoexceedasoftlimitarewarnedandif,after threeloginsessions,theirdiskusagehasnotdroppedbelowthesoftlimit,theirsoftlimitis treatedasahardlimit.Utilitiesexistforthecreation,maintenance,andreportingofdisk quotas. •Systemtimeisnowavailableinmicrosecondprecisionandmillisecondaccuracy.Usersare providedwith3high-resolutiontimerswhichmaybesetuptoautomaticallyreloadonexpi-ration.Thetimersoperateinrealtime,usertime,andprocessvirtualtime(forprofiling). Allstatisticsandtimesreturnedtousersarenowgiveninastandardformatwithseconds andmicrosecondsseparated.Thiseliminatesprogramdependenceonthelineclockfrequency. •Anewsystemcalltorenamefilesinthesamefilesystemhasbeenadded.Thiscalleliminatesmanyoftheanomalieswhichcouldoccurinolderversionsofthesystemduetolackof atomicityinremovingandrenamingfiles. •Anewsystemcalltotruncatefilestoaspecificlengthhasbeenadded.Thiscallimproves theperformanceoftheFortranI/Olibrary. •Swapspaceconfigurationhasbeenimprovedbyallowingmultipleswappartitionofvarying sizestobeinterleaved.Thesepartitionsaresizedatboottimetominimizeconfiguration dependencies. •TheFortran77compilerandassociatedI/Olibraryhaveundergoneextensivechangesto improvereliabilityandperformance.Compilationmay,optionally,includeoptimization phasestoimprovecodedensityanddecreaseexecutiontime. •Anewsymbolicdebugger,dbx,replacestheoldsymbolicdebuggersdb.Dbxworksonboth CandFortran77programsandallowsuserstosetbreakpointsandtraceexecutionby sourcecodelinenumbers,referencestomemorylocations,procedureentry,etc.Dbxallows userstoreferencestructuredandlocalvariablesusingtheprogram’sprogramminglanguage syntax. •Thedelivermailprogramhasbeenreplacedbysendmail.Sendmailprovidesfullinternetworkrouting,domainstylenamingasdefinedintheDARPARequestForCommentsdocument#833,andeliminatesthecompiledinconfigurationdatabasepreviouslyusedbydelivermail.Further,sendmailusestheDARPAstandardSimpleMailTransferProtocol (SMTP)formaildelivery. •Thesystemcontainsanewlineprintersystem.Multiplelineprintersandspoolingqueues aresupportedthroughaprinterdatabasefile.Printersonseriallines,rasterprinting devices,andlaserprintersaresupportedthroughaseriesoffilterprogramswhichinterface tothestandardlineprinter‘‘coreprograms’’.Alineprintercontrolprogram,lpc,allows printersandprinterqueuestobemanipulated.Spoolingtoremoteprintersissupportedin atransparentfashion. •Cuhasbeenreplacedbyanewprogramtip.Tipsupportsanumberofauto-callunitsand allowsdestinationsitestobespecifiedbynameratherthanphonenumber.Tipalsosupportsfiletransfertonon-UNIXmachinesandcanbeusedwithsiteswhichrequirehalf-duplexand/orodd-evenparity. •Uucpnowsupportsmanyauto-callunitsotherthantheDN11.Spoolinghasbeenreorga-nizedintomultipledirectoriestocutdownonsystemoverhead.Severalnewutilitiesand shellscriptsexistforuseinadminstratinguucptraffic.Operationhasbeengreatly -3-improvedbynumerousbugfixes. Bugfixesandchanges Section1 adbSupporthasbeenaddedforinterpretingkerneldatastructuresonarunningsystem andinpostmortemcrashdumpscreatedbysavecore.A−koptioncausesadbto mapaddressesaccordingtothesystemandcurrentprocesspagetables.Anewcommand,$p,canbeusedtoswitchbetweenprocesscontexts.Manyscriptsareavailableforsymbolicallydisplayingkerneldatastructures,searchingforaprocess’contextbyprocessID,etc.Anewdocument,‘‘UsingADBtoDebugtheUNIXKernel’’, supplieshintsintheuseofadbwithsystemcrashdumps. addbibIsanewutilityforcreatingandextendingbibliographicdatabasesforusewithrefer. applyIsanewprogramwhichmaybeusedtoapplyacommandtoasetofarguments. arHasanewkey,‘o’,forpreservingafile’smodificationtimewhenitisextractedfrom anarchive. ccSupportstheadditionalsymbolinformationusedbydbx.Theoldsymbolinformation,usedbythedefunctsdbdebugger,isavailablebyspecifyingthe−goflag.A newflag,−pg,createsexecutableprogramswhichcollectprofilinginformationtobe interpretedbythenewgprofprogram.AbugintheCpreprocessor,whichcaused linenumberstobeincorrectformacroswithformalparameterswithembeddednewlineshasbeenfixed.TheCpreprocessornowproperlyhandleshexadecimalconstants in‘‘#if’’constructsandchecksformissing‘‘#endif’’statements. chfnNowworksinteractivelyinchangingauser’sinformationfieldinthepasswordfile. chgrpIsnowinsection1andmaybeexecutedbyanyone.Usersotherthanthesuper-user maychangegroupownershipofafiletheyowntoanygroupintheirgroupaccess list. cpNowhasa−rflagtocopyrecursivelydownafilesystemtree. cshAbugwhichcausedbackquotedcommandstowedgetheterminalwheninterrupted hasbeenfixed.Jobidentifiersarenowglobbed.Abugwhichcausedthe‘‘wait’’ commandtouninteruptibleincertaincaseshasbeenfixed.Historymaynowbe savedandrestoredacrossterminalsessionswiththesavehistvariable.Thenewgrp commandhasbeendeletedduetothenewgroupfacilities. ctagsNowhandlesCtypedefs. cuExistsonlyintheformofa‘‘compatiblefront-end’’tothenewtipprogram. dbxIsanewsymbolicdebuggerreplacingsdb.DbxhandlesCandFortranprograms. delivermail Hasbeenreplacedbythenewsendmailprogram. dfUnderstandsthenewfilesystemorganizationandreportsalldiskspacetotalsinkilobytes. duNowreportsdiskusageinkilobytesandusesthenewfieldintheinodestructure whichcontainstheactualnumberofblocksallocatedtoafiletoincreaseaccuracyof calculations. dumpHasbeenmovedtosection8. errorHasbeentaughtabouttheerrormessageformatsoftroff. eyaccAbugwhichcausedthegeneratedparsertonotrecognizevalidnullstatementshas beenfixed.

-4-f77Hasundergonemajorchanges. Thei/olibraryhasbeenextensivelytestedanddebugged.Sequentialfilesarenow openedattheBEGINNINGbydefault;previouslytheywereopenedattheend. Compilationofdatastatementshasbeensubstantiallyspedup.Significantnewoptimizationisoptionallyavailable(thisisstillabitbuggyandshouldbeusedwithcaution).Evenwithoutoptimization,however,singleprecisioncomputationsexecute muchfaster. Thenewdebugger,dbx,hasreplacedsdbfordebuggingFortranprograms;sdbisno longersupported. Fileswith‘‘.F’’suffixesarepreprocessedbytheCpreprocessor.ThisallowsC-style ‘‘#include’’and‘‘#define’’constructstobeused.Thecompilerhasbeenmodifiedto printerrormessageswithsensiblelinenumbers.Makealsounderstandsthe‘‘.F’’suffix.NotethatwhenusingtheCpreprocessor,the72columnconventionisnotfollowed. The−Ioptionforspecifyingshortintegershasbeenchangedto−i.The−Ioptionis nowusedtospecifydirectorysearchpathsfor‘‘#include’’statements.A−pgoption forcreatingexecutableimageswhichcollectprofilinginformationforgprofhasbeen added. fedIsafonteditorofdubiousvalue. fileNowunderstandssymboliclinks. findHasanew−typevalue,‘l’,forfindingsymboliclinks. fpIsanewcompiler/interpreterfortheFunctionalProgramminglanguage.AsupportingdocumentispresentinVolume2CoftheUNIXProgrammer’sManual. fprIsanewprogramforprintingFortranfileswithembeddedFortrancarriagecontrols. fsplitIsanewprogramforsplittingamulti-functionFortranfileintoindividualfiles. ftpIsanewprogramwhichsupportstheARPAstandardFileTransferProtocol. gcoreIsanewprogramwhichcreatesacoredumpofarunningprocess. gprofIsanewprofilingtoolwhichdisplaysexecutiontimeforthedynamiccallgraphofa program.GprofworksonC,Fortran,andPascalprogramscompiledwiththe−pg option.Gprofmayalsobeusedincreatingacallgraphprofilefortheoperatingsystem.Asupportingdocument,‘‘gprof:ACallGraphExecutionProfiler"isincluded inVolume2CoftheUNIXProgrammer’sManual. groupsIsanewprogramwhichdisplaysauser’sgroupaccesslist. hostidIsanewprogramwhichdisplaysthesystem’suniqueidentifierasreturnedbythe newgethostidsystemcall.Thesuper-userusesthisprogramtosetthehostidentifier atboottime. hostnameIsanewprogramwhichdisplaysthesystem’snameasreturnedbythenewgethostnamesystemcall.Thesuper-userusesthisprogramtosetthehostnameatboot time. indentIsanewprogramforformattingCprogramsource. installIsashellscriptusedininstallingsoftware. iostatNowreportskilobytespersecondtransferredforeachdisk.Thisisusefulastheunit ofinformationtransferredisnolongeraconstantonekilobytes. lastNowdisplaystheremotehostfromwhichauserloggedin(whenaccessingamachine acrossanetwork).Thepseudouser‘‘ftp’’maybespecifiedtofindoutinformation aboutFTPfiletransfersessions. lastcommNowdisplaysflagsforeachcommandindicatingiftheprogramdumpedcore,used PDP-11mode,executedwithaset-user-ID,orwascreatedastheresultofafork -5- (withnofollowingexec). learnNowhaslessonsforvi(thisisusercontributedsoftwarewhichisnotpartofthestandardsystem). lintHasanew−CflagforcreatinglintlibrariesfromCsourcecode.Hasimprovedtype checkingonstaticvariables. lispHasbeenportedtoseveral68000UNIXsystems,therelevantcodeisincludedinthe distribution.Anewvectordatatypeandaformof‘‘closure’’havebeenadded. lnHasanewflag,−s,forcreatingsymboliclinks. loginHasbeenextensivelymodifiedforusewiththerlogindandtelnetdnetworkservers. lpqIstotallynew,seelpr. lprAnditsrelatedprogramsaretotallynew.Thelineprintersystemsupportsmultiple printersofmanydifferentcharacteristics.Amasterdatabase,/etc/printcap, describesbothlocalprintersandprintersaccessableacrossanetwork.Adocument describingthelineprintersystemisnowpartofVolume2CoftheUNIXProgrammer’sManual. lprmIstotallynew,seelpr. lsHasbeenrewrittenforthenewdirectoryformat.Itunderstandssymboliclinksand usesthenewinodefieldwhichcontainstheactualnumberofblocksallocatedtoafile whenthe−sflagissupplied.Manyrarelyusedoptionshavebeendeleted. m4Abugwhichcausedm4todumpcorewhenkeywordswereundefinedthenredefined hasbeenfixed. MailNowsupportsmailfoldersinthestyleoftheRandMHsystem.Hasbeenreworked tocooperatewithsendmailinunderstandingthenewmailaddressformats.Allows userstodefinedmessageheaderfieldswhicharenotbedisplayedwhenamessagesis viewed.Manyotherchangesaredescribedinarevisedversionoftheusermanual. makeUnderstandsnottounlinkdirectorieswheninterrupted.Understandsthenew‘‘.F’’ suffixforFortransourcefileswhicharetoberunthroughtheCpreprocessor.Hasa newpredefinedmacroMFLAGSwhichcontainstheflagssuppliedtomakeonthe commandline(usefulincreatinghierarchiesofmakefiles). mkdirNowusesthemkdirsystemcalltorunfaster. mtHasanewcommand,status,whichshowsthecurrentstateofatapedrive. mvHasbeenrewrittentousethenewrenamesystemcall.Asaresult,multipledirectoriesmaynowbemovedinasinglecommand,therestrictionsonhaving‘‘..’’ina pathnamearenolongerpresent,andeverythingrunsfaster. netAndallrelatedBerknetprogramsarenolongerpartofthestandarddistribution. Theseprogramsliveonin/usr/src/oldforthosewhocannotdowithoutthem. netstatIsanewprogramwhichdisplaysnetworkstatisticsandactiveconnections. oldcshNolongerexists. odHasgobsofnewformatsoptions. pagesizeIsanewprogramwhichprintsthesystempagesizeforuseinconstructingportable shellscripts. passwdNowreliablyinterlockswithchsh,chfn,andvipw,inguardingagainstconcurrent updatestothepasswordfile. pc/piForloopsarenowdoneaccordingtothestandard.Filesmaynowbedynamically allocatedanddisposed.Recordsandvariantrecordsarenowalignedtocorrespond toCstructuresandunions(thiswasfalselyclaimedbefore).Severalobscurebugs involvingformalroutineshavebeenfixed.Threenewlibraryroutinessupportrandomaccessfilei/o,see/usr/include/pascalfordetails.

-6-pcForloopvariablesandwithpointersarenowallocatedtoregisters.Separatecompi-lationtypecheckingcannowbedonewithoutreferencetothesourcefile;thisper-mitsmovement(includingdistribution)of.ofilesandcreationoflibraries.Display entriesaresavedonlywhenneeded(aspeedoptimization). pdxIsanewdebuggerforusewithpi.Pdxisinvokedautomaticallybytheinterpreterif arun-timeerrorisencountered.Futureworkisplannedtoextendthenewdbx debuggertounderstandcodegeneratedbythePascalcompilerpc. psHasbeenchangedtoworkwiththenewkernelandisnolongerdependentonsystem pagesize.Allprocesssegmentsizesarenowshowninkilobytes.Understandsthat theold‘‘usingnewsignalfacilities’’bitintheprocessstructurenowmeans‘‘usingold 4.1BSDsignalfacilities’’. pwdNowsimplycallsthegetwd(3)routine. rcpIsanewprogramforcopyingfilesacrossanetwork.Thecompletesyntaxofcpis supported,includingrecursivedirectorycopying. referHashadmanybugsfixedinitandtheassociated−msmacropackagesupportmade towork. resetNowresetsallthespecialcharacterstothesystemdefaultsspecifiedintheinclude file<sys/ttychars.h>. rloginIsanewprogramforloggingintoamachineacrossanetwork.Rloginusesthefiles /etc/hosts.equivand.rhostsintheuserslogindirectorytoallowloginstobeperformedwithoutapassword.Rloginsupportsproperhandlingofˆ S/ˆ Qandflushing ofoutputwhenaninterruptistypedattheterminal.Its‘˜ ’escapesequencesare reminiscentoftheoldcuprogram(asitisbasedonthesamesourcecode). rmdirNowusesthermdirsystemcalltorunmoreefficientlyandnotrequirerootprivileges. Unfortunately,thismeansargumentswhichendinoneormore‘‘/’’charactersareno longerlegal. roffbibIsanewprogramforrunningoffbibiliographicdatabases. rshIsanewprogramwhichsupportsremotecommandexecutionacrossanetwork. ruptimeIsanewprogramwhichdisplayssystemstatusinformationforclustersofmachines attachedtoalocalareanetwork. rwhoIsanewprogramwhichdisplaysusersloggedinonclustersofmachinesattachedtoa localareanetwork. scriptHasbeenrewrittentousepseudo-terminals.ThisallowstheCshelljobcontrolfacili-ties(amongotherthings)tobeusedwhilescripting.Asideeffectofthischangeis thatscriptsnowcontaineverythingtypedataterminal. sdbHasbeenreplacedbydbx;itstilllivesonin/usr/src/oldforthosewithapersonal attachment. sendbugIsanewcommandforsubmittingbugreportson4.2BSDinastandardformatsuitableforautomaticfilingbythebugfilerprogram. shNolongerhasanewgrpcommandduetothenewgroupsfacilities. sortbibIsanewcommandforsortingbibliographicdatabases. stripHasbeenmadeblindinglyfastbyusingthenewtruncatesystemcall(therebyeliminatingtheoldmethodofcopyingthefile). sttyThedefaultsystemerase,kill,andinterruptcharactershavebeenmadetheDEC standardvaluesofDEL(‘ˆ ?’),‘ˆ U’,and‘ˆ C’.Thisisnotexpectedtogainmuch popularity,butwasdoneintheinterestofcompatibilitywithmanyotherstandard operatingsystems. suHasbeenchangedtodoa‘‘fulllogin’’whenstartingupthesubshell.Anewflag,−f, doesa‘‘fast’’suforwhenasystemisheavilyloaded.Extraargumentssuppliedtosu -7-arenowtreatedasacommandlineandexecuteddirectlyinsteadofcreatinganinter-activeshell. syslineIsanewprogramformaintainingsystemstatusinformationonterminalswhichsupporta‘‘statusline’’;apoorman’salternativetoawindowmanager(oremacs). tailHasalargerbuffersothat‘‘tail−r’’andsimilarshowmore. talkIsanewprogramwhichprovidesascreen-orientedwritefacility.Usersmaybe ‘‘talkedto’’acrossanetwork,thoughsatelliteresponsetimeshaveindicatedoverseas conversationsarestillbestdonebyphone.Canbeveryobnoxiouswhenengagedin importantwork. tarNowallocatesitsinternalbuffersdynamicallysothattheblocksizecanbespecified tobeverylargeforstreamingtapedrives.Also,nowavoidsmanycore-corecopy operations.Hasanew−Coptionforforcingchdiroperationsinthemiddleofoperation(therebyallowingmultipledisjointsubtreestobeeasilyplacedinasinglefile, eachwithshortrelativepathnames).Hasanewflag,‘B’,forforcing20blockrecords tobereadandwritten;usefulinjoiningtwotarcommandswitharemoteshellto transferlargeamountsofdataacrossanetwork. telnetIsanewprogramwhichsupportstheARPAstandardTelnetprotocol. tipReplacescuasthestandardmechanismforconnectingtomachinesacrossaphone lineorthroughahardwiredconnection.Tipusesadatabaseofsystemdescriptions, supportsmanydifferentauto-callunits,andunderstandsmanynuancesrequiredto talktonon-UNIXsystems.Filesmaybetransferredtoandfromnon-UNIXsystems inasimplefashion. ulAbugwhichsometimescausedanextrablanklinetobeprintedafterreachingendof filehasbeenfixed. uucpAndrelatedprogramshavebeenextensivelyenhancedtosupportmanydifferent auto-callunitsandmultiplespoolingdirectories(amongotherthings).Alarge numberofbugsandperformanceenhancementshavebeenmade. uusnapIsanewprogramwhichgivesasnap-shotoftheuucpspoolingarea. vfontinfoIsaprogramusedtoinspectandprintinformationaboutfonts. vgrindNowusesaregularexpressionlanguagetodescribeformatting.A−fflagforces vgrindtoactasafilter,generatingoutputsuitableforinclusionintroffand/ornroff documents.LanguagedescriptionsexistforC,Pascal,Model,Cshell,Bourneshell, Ratfor,andIconprograms. viAbugwhichcausedtheˆ Bcommandtoplacethecursoronthewronglinehasbeen fixed.Abugwhichcausedvitobelieveafilehadbeenmodifiedwhenani/oerror occurredhasbeenfixed.Abugwhichallowed‘‘hardtabs’’tobesetto0causinga dividebyzerofaulthasbeenfixed. vlpIsanewprogramforprettyprintingLispprograms. vmstatHashadonenewpieceofinformationaddedto−ssummary,thenumberoffastpage reclaimsperformed.Thefieldsrelatedtopagingactivityarenowallgiveninkilobytes. vprAndassociatedprogramsforspoolingandprintingfilesonVarianandVersatecprintersarenowshellscriptswhichusethenewlineprintersupport. vwidthIsanewprogramformakingtroffwidthtablesforafont. wcIsonceagainidenticaltotheversion7program.Thatis,the−v,−t,−b,−s,and −uflagshavebeendeleted. whereisUnderstandsthenewdirectoryorganizationforthesourcecode. whichNowunderstandshowtohandlealiases.

-8-whoNowdisplaystheremotemachinefromwhichauserisloggedin. Section2. Themostimportantchangeinsection2isthatthedocumentationhasbeensignificantly improved.Manualpageentriesnowindicatethepossibleerrorcodeswhichmaybereturnedand howtointerpretthem.Theintroductiontosection2nowincludesaglossaryoftermsused throughoutthesection.Theterminologyandformattinghavebeenmadeconsistent.Manymanualpagesnowhave‘‘NOTES’’or‘‘CAVEATS’’providingusefulinformationheretoforeleftoutfor thesakeofbrevity.Asalwaysthemanualpagesarestillfortheprogrammer;theyareterseand extremelyconcise.The‘‘4.2BSDSystemManual’’islikewiseconcise,butabitmoreverbosein providinganoverallpictureofthesystemfacilities. Withregardtochangesinthefacilities,thesefallintothreemajorcategories:interprocess communication,signals,andfilesystemrelatedcalls.Theinterprocesscommunicationfacilities centeraroundthesocketmechanismdescribedinthe‘‘A4.2BSDInterprocessCommunication Primer’’.Thenewsignalsdonothaveanaccompanyingdocument,sothemanualpagesshould bestudiedcarefully.Thenewfilesystemcallsprettymuchstandontheirown,withalatesection ofthedocument‘‘AFastFileSystemforUNIX’’supplyingaquickoverviewofthemostimportantnewfilesystemfacilities.Finally,itshouldbenotedthatthejobcontrolfacilitiesintroduced in4.1BSDhavebeenadoptedasastandardpartof4.2BSD.Nospecialdistinctionisgivento thesecalls(in4.1BSDtheywereearmarked‘‘2J’’). Manyofthenewsystemcallshavebotha‘‘set’’anda‘‘get’’form.Onlythe‘‘get’’formsare indicatedbelow.Consultthemanualfordetailsonthe‘‘set’’form. introHasbeenupdatedtoreflectthenewlistofpossibleerrorcodes.Nowincludesaglossaryofterminologyusedinsection2. accessNowhassymbolicdefinitionsforthemodeparameterdefinedin<sys/file.h>. bindIsanewinterprocesscommunicationsystemcallforbindingnamestosockets. connectIsanewinterprocesscommunicationsystemcallforestablishingaconnection betweentwosockets. creatHasbeenobsoletedbythenewopeninterface. fchmodIsanewsystemcallwhichdoesachmodoperationgivenafiledescriptor;usefulin conjunctionwiththenewadvisorylockingfacilities. fchownIsanewsystemcallwhichdoesachownoperationgivenafiledescriptor;usefulin conjunctionwiththenewadvisorylockingfacilities. fcntlIsanewsystemcallwhichisusefulincontrollinghowi/oisperformedonafile descriptor(non-blockingi/o,signaldrivei/o).Thisinterfaceiscompatiblewiththe SystemIIIfcntlinterface. flockIsanewsystemcallformanipulatingadvisorylocksonfiles.Locksmaybesharedor exclusiveandlockingoperationsmaybeindicatedasbeingnon-blocking,inwhich caseaprocessisnotblockediftherequestedlockiscurrentlyinuse. fstatNowreturnsalargerstatbuffer;seebelowunderstat. fsyncIsanewsystemcallforsynchronizingafile’sin-corestatewiththatondisk.Its intendeduseisinbuildingtransactionorientedfacilities. ftruncateIsanewsystemcallwhichdoesatruncateoperationgivenafiledescriptor;usefulin conjunctionwiththenewadvisorylockingfacilities. getdtablesize Isanewsystemcallwhichreturnsthesizeofthedescriptortable. getgroupsIsanewsystemcallwhichreturnsthegroupaccesslistforthecaller.

-9-gethostidIsanewsystemcallwhichreturnstheunique(hopefully)identifierforthecurrent host. gethostname Isanewsystemcallwhichreturnsthenameofthecurrenthost. getitimerIsanewsystemcallwhichgetsthecurrentvalueforanintervaltimer. getpagesize Isanewsystemcallwhichreturnsthesystempagesize. getpriority Isanewsystemcallwhichreturnsthecurrentschedulingpriorityforaspecificprocess,agroupofprocesses,orallprocessesownedbyauser.Inthelattertwocases, thepriorityreturnedisthehighest(lowestnumericalvalue)enjoyedbyanyofthe specifiedprocesses. getrlimitIsanewsystemcallwhichreturnsinformationaboutaresourcelimit.Thegetrlimit andsetrlimitcallsreplacetheoldvlimitcallfrom4.1BSD. getrusageIsanewsystemcallwhichreturnsinformationaboutresourceutilitizationofachild processorthecaller.Thiscallreplacesthevtimescallof4.1BSD. getsockopt Isanewinterprocesscommunicationsystemcallwhichreturnsthecurrentoptions presentonasocket. gettimeofday IsanewsystemcallwhichreturnsthecurrentGreenwichdateandtime,andthecurrenttimezoneinwhichthemachineisoperating.Timeisreturnedinsecondsand microsecondssinceJanuary1,1970. ioctlHasbeenchangedtoencodethesizeofparametersandwhethertheyaretobecopied in,out,orinandoutoftheuseraddressspaceintherequest.Thesymbolicnames forthevariousioctlrequestsremainthesame,onlythenumericvalueshavechanged. Anumberofnewioctlsexistforusewithsocketsandthenetworkfacilities.Theold LINTRUPrequesthasbeenreplacedbyacalltofcntlandtheSIGIOsignal. killpgHasnowbeenmadeasystemcall;in4.1BSDitwasalibraryroutine. listenIsanewinterprocesscommunicationsystemcallusedtoindicateasocketwillbe usedtolistenforincomingconnectionrequests. lseekNowhassymbolicdefinitionsforitswhenceparameterdefinedin<sys/file.h>. mkdirIsanewsystemcallwhichcreatesadirectory. mpxThemultiplexedfilefacilitiesarenolongerpartofthesystem.Theyhavebeen replacedbythesocket,andrelated,systemcalls. openIsdifferent,nowtakinganoptionalthirdparameterandsupportingfilecreation, automatictruncation,automaticappendonwrite,and‘‘exclusive’’opens.Theopen interfacehasbeenmadecompatiblewithSystemIIIwiththeexceptionthatnonblockingopensonterminallinesrequiringcarrierarenotsupported. profilNowreturnsstatisticalinformationbasedona100hzclockrate. quotaIsanewsystemcallwhichispartofthediskquotafacilities.Quotaisusedto manipulatediskquotasforaspecificuser,aswellasperformcertainrandomchores suchassyncingquotastodisk. readNowautomaticallyrestartswhenareadonaterminalisinterruptedbyasignal beforeanydataisread. readvIsanewsystemcallwhichsupportsscatteringofreaddatainto(possibly)disjoint areasofmemory. readlinkIsanewsystemcallforreadingthevalueofasymboliclink.

-10-recvIsanewinterprocesscommunicationsystemcallusedtoreceiveamessageonacon-nectedsocket. recvfromIsanewinterprocesscommunicationsystemcallusedtoreceiveamessageona(possibly)unconnectedsocket. recvmsgIsanewinterprocesscommunicationsystemcallusedtoreceiveamessageona(possibly)unconnectedsocketwhichmayhaveaccessrightsincluded.Whenusingonmachinecommunication,recvmsgandsendmsgmaybeusedtopassfiledescriptors betweenprocesses. renameIsanewsystemcallwhichchangesthenameofanentryinthefilesystem(plainfile, directory,characterspecialfile,etc.).Renamehasanimportantpropertyinthatit guaranteesthetargetwillalwaysexist,evenifthesystemcrashesinthemiddleofthe operation.Renameonlyworkswithsourceanddestinationinthesamefilesystem. rmdirIsanewsystemcallforremovingadirectory. selectIsanewsystemcall(mainlyforinterprocesscommunication)whichprovidesfacility forsynchronousi/omultiplexing.Setsoffiledescriptorsmaybequeriedforreadability,writability,andifanyexceptionalconditionsarepresent(suchasoutofband dataonasocket).Anoptionaltimeoutmayalsobesuppliedinwhichcasetheselect operationwillreturnafteraspecifiedperiodoftimeshouldnodescriptorsatisfythe requests. sendIsanewinterprocesscommunicationsystemcallforsendingamessageonaconnectedsocket. sendtoIsanewinterprocesscommunicationsystemcallforsendingamessageona(possibly)unconnectedsocket. sendmsgIsanewinterprocesscommunicationsystemcallforsendingamessageona(possibly)unconnectedsocketwhichmayincludedaccessrights. setquotaIsanewsystemcallforenablingordisablingdiskquotasonafilesystem. setregidIsanewsystemcallwhichreplacesthe4.1BSDsetgidsystemcall.Setregidallows therealandeffectivegroupID’sofaprocesstobesetseparately. setreuidIsanewsystemcallwhichreplacesthe4.1BSDsetuidsystemcall.Setreuidallows therealandeffectiveuserID’sofaprocesstobesetseparately. shutdownIsanewinterprocesscommunicationsystemcallforshuttingdownpartoralloffullduplexconnection. sigblockIsanewsystemcallforblockingsignalsduringacriticalsectionofcode. sigpauseIsanewsystemcallforblockingasetofsignalsandthenpausingindefinitelyfora signaltoarrive. sigsetmask Isanewsystemcallforsettingthesetofsignalswhicharecurrentlyblockedfrom deliverytoaprocess. sigstackIsanewsystemcallfordefininganalternatestackonwhichsignalsaretobeprocessed. sigsysIsnolongersupported.Thenewsignalfacilitiesareasupersetofthosewhichsigsys provided. sigvecIsthenewsystemcallinterfacefordefiningsignalactions.Foreachsignal(except SIGSTOPandSIGKILL),sigvecallowsa‘‘signalvector’’tobedefined.Thesignal vectoriscomprisedofahandler,amaskofsignalstobeblockedwhilethehandler executes,andanindicationofwhetherornotthehandlershouldexecuteonasignal stackdefinedbyasigstackcall.Theoldsignalinterfaceisprovidedasalibraryroutinewithseveralimportantcaveats.First,signalactionsarenolongerresettotheir defaultvalueafterasignalisdeliveredtoaprocess.Second,whileasignalhandleris -11-executingthesignalwhichisbeingprocessedisblockeduntilthehandlerreturns.To simulatetheoldsignalinterface,theusermustexplicitlyresetthesignalactiontobe thedefaultvalueandunblockthesignalbeingprocessed. Fournewsignalshavebeenaddedfortheinterprocesscommunicationandinterval timerfacilities.SIGIOisdeliveredtoaprocesswhenanfcntlcallenablessignal driveni/oandinputispresentonaterminal(andasignalhandlerisdefined).SIG-URGisdeliveredwhenanurgentconditionarisesonasocket(andahandleris defined).SIGPROFandSIGVTALRMareassociatedwiththeITIMERPROFand ITIMERVIRTUALintervaltimers,anddeliveredtoaprocesswhensuchatimer expires(theSIGALRMsignalisusedfortheITIMERREALintervaltimer).The oldSIGTINTsignalisreplacedbySIGIO. socketIsanewinterprocesscommunicationsystemcallforcreatingasocket. socketpair Isanewinterprocesscommunicationsystemcallforcreatingapairofconnectedand unnamedsockets. statNowreturnsalargerstructure.Newfieldsarepresentindicatingtheoptimal blockingfactorinwhichi/oshouldbeperformed(fordiskfilestheblocksizeofthe underlyingfilesystem)andtheactualnumberofdiskblocksallocatedtothefile. Inodenumbersarenow32-bitquantities.Severalsparefieldshavebeenallocatedfor futureexpansion.Theseincludespacefor64-bitfilesizesand64-bittimestamps. Twonewfiletypesmaybereturned,SIFLNKforsymboliclinks,andSIFSOCKfor socketsresidinginthefilesystem. swaponHasbeenrenamedfromthevswaponcallof4.1BSD. symlinkIsanewsystemcallforcreatingasymboliclink. truncateIsanewsystemcallfortruncatingafiletoaspecificsize. unlinkShouldnolongerbeusedforremovingdirectories.Directoriesshouldonlybecreated withmkdirandremovedwithrmdir.Creatinghardlinkstodirectoriescancausedisastrousresults. utimeIsdefunct,replacedbyutimes. utimesIsanewsystemcallwhichusesthenewtimeformatinsettingtheaccessedand updatedtimesonafile. vforkIsstillpresent,butdefinitelyonitswayout.Futureplansincludeimplementingfork withaschemeinwhichpagesareinitiallysharedread-only.Onthefirstattemptby aprocesstowriteonapagetheparentandchildwouldreceiveseparatewritable copiesofthepage. vlimitIsnolongersupported.Vlimitisreplacedbythegetrlimitandsetrlimitcalls. vreadIsnolongersupportedinthesystem. vswaponHasbeenrenamedswapon. vtimesIsnolongersupported.Vtimesisreplacedbythegetrusagecall. vwriteIsnolongersupportedinthesystem. waitNowisautomaticallyrestartedwheninterruptedbyasignalbeforestatuscouldbe returned. wait3Returnsresourceusageinadifferentformatthanthatwhichwasreturnedin4.1BSD. Thisstructureiscompatiblewiththenewgetrusagesystemcall.Wait3isnowautomaticallyrestartedwheninterruptedbyasignalbeforestatuscouldbereturned. writeNowisautomaticallyrestartedwhenwritingonaterminalandinterruptedbyasignalbeforeanyi/owascompleted. writevIsanewversionofthewritesystemcallwhichsupportsgatheringofdatain(possibly)discontiguousareasofmemory -12-Section3 Thesection3documentationhasbeenreorganizedtogroupmanualentriesbylibrary. Introductorysectionsforeachlogicalandphysicallibrarycontainlistsoftheentrypointsinthe library. Anumberofroutineswhichhadbeensystemcallsunder4.1BSDarenowuser-levellibrary routinesin4.2BSD.Theseroutineshavebeengroupedundersection‘‘3C’’headings,‘‘C’’forcompatibility.Further,certainroutinespresentinthestandardCrun-timelibrarywhichdonoteas-ilycategorizeaspartofoneofthestandardlibraries,havebeengroupunder‘‘3X’’headings. cursesAnumberofbugfixeshavebeenincorporated,andthedocumentationhasbeen revised. stdioThestandardi/olibraryhasbeenmodifiedtoblocki/ooperationstodiskfiles accordingtotheblocksizeoftheunderlyingfilesystem.Thisisaccomplishedusing thenewstblksizevaluereturnedbyfstat.Theresultantperformanceimprovementis significantastheold1kilobytebuffersizeoftenresultedin7memory-to-memory copyoperationsbythesystemon8kilobyteblockfilesystems. End-of-filemarksnow‘‘stick’’.Thatis,allinputrequestsonastdiochannelafter encounteringend-of-filewillreturnend-of-fileuntilaclearerrcallismade.Thishas implicationsforprogramswhichusestdiotoreadfromaterminalanddonotprocess end-of-fileasaterminatingkeystroke. Twonewfunctionsmaybeusedtocontroli/obuffering.Thesetlinebufroutineis usedtochangestdoutorstderrfromblockbufferedorunbufferedtolinebuffered. Thesetbufferroutineisanalternateformofsetbufwhichcanbeusedafterastream hasbeenopened,butbeforeitisreadorwritten. bstringThreenewroutines,bcmp,bcopy,andbzerohavebeenaddedtothelibrary.These routinesusetheVAXstringinstructionstomanipulatebinarybytestringsofa knownsize. ctimeNowusesthegettimeofdaysystemcallandsupportstimeconversioninsixdifferent timezones.Daylightsavingscalculationsarealsoperformedineachtimezonewhen appropriate. isprintNowconsidersspaceaprintingcharacter;asthemanualpagehasalwaysindicated. directoryIsanewdirectoryinterfacepackagewhichprovidesaportableinterfacetoreading directories.Aversionofthislibrarywhichoperatesunder4.1BSDisalsoavailable. getpassNowproperlyhandlesbeingunabletoopen/dev/tty. getwdHasbeenmovedfromtheoldjobslibrarytothestandardCrun-timelibrary.Itnow returnsanerrorstringratherthanprintingonthestandarderrorwhenunableto decipherthecurrentworkingdirectory. perrorNowusesthewritevsystemcalltopassallitsargumentstothesysteminasingle systemcall.Thishasprofoundeffectsonprogramswhichtransmiterrormessages acrossanetwork. psignalAndsyssiglistareroutinesforprintingsignalnamesinanequivalentmannertoperror. qsortHasbeengreatlyspedupbychoosingarandomelementwithwhichtoapplyits divideandconqueralgorithm. randomIsasuccessortorandwhichgeneratesmuchbetterrandomnumbers.Theoldrand routineisstillavailableandmostprogramshavenotbeenswitchedovertorandomas doingsowouldmakecertainfacilitiessuchencryptedmailunabletooperateonexistingdatafiles.

-13-setjmpAndlongjmpnowsaveandrestorethesignalmasksothatnon-localexitfromasig-nalhandleristransparent.Theoldsemanticsareavailablewithsetjmpand longjmp. netIsanewsetofroutinesforaccessingdatabasefilesfortheDARPAInternet.Four databasesexist:oneforhostnames,onefornetworknames,oneforprotocolnumbers,andonefornetworkservices.ThelatterreturnsanInternetportandprotocol tobeusedinaccessingagivennetworkservice. Anadditionalcollectionofroutines,allprefacedwith‘‘inet’’maybeusedtomanipulateInternetaddresses,andinterpretandconvertbetweenInternetaddressesand ASCIIrepresentationsintheInternetstandard‘‘dot’’notation. Finally,routinesareavailableforconverting16and32bitquantitiesbetweenhost andnetworkorder(onhigh-endermachinestheseroutinesaredefinedtobenoops). fstabTheroutinesformanipulating/etc/fstabhavebeenrewrittentoreturnarbitrary lengthnull-terminatedstrings. Section4 Thesystemnowsupportsthe11/730,thenew64KbitRAMmemorycontrollersforthe 11/750and11/780,andthesecondUNIBUSadapterforthe11/750.Severalnewcharacter and/orblockdevicedrivershavebeenadded,aswellassupportformanyhardwaredeviceswhich areaccessibleonlythroughthenetworkfacilities.Eachnewpieceofhardwaresupportedislisted below. Newmanualentriesinsection4havebeencreatedtodescribecommunicationsprotocols, andnetworkarchitecturessupported.Atpresenttheonlynetworkarchitecturefullysupportedis theDARPAInternetwiththeTCP,IP,UDP,andICMPprotocols. accAnetworkdriverfortheACCLH/DHIMPinterface. adAdriverfortheDataTranslationA/Dconverter. arpTheAddressResolutionProtocolfordynamicallymappingbetwee32-bitDARPA Internetaddressesand48-bitXerox10Mb/sEthernetaddresses. cssAnetworkdriverfortheDECIMP-11ALH/DHIMPinterface. dmcAnetworkinterfacedriverfortheDECDMC-11/DMR-11point-to-pointcommunica-tionsdevice. ecAnetworkinterfacedriverforthe3Com10Mb/sEthernetcontroller. enAnetworkinterfacedriverfortheXerox3Mb/sexperimentalEthernetcontroller. hyAnetworkinterfacedriverfortheNetworkSystemsHyperchannelAdapter. ikAdriverforanIkonasframebuffergraphicsdeviceinterface. ilAnetworkinterfacedriverfortheInterlan10Mb/sEthernetinterface. impAnetworkinterfacedriverforthestandard1822interfacetoanIMP;usedinconjunctionwitheitheraccorcsshardware. kgAdriverforaKL-11/DL-11Wusedasanalternaterealtimeclocksourceforgather-ingkernelstatisticsandprofilinginformation. loAsoftwareloopbacknetworkinterfaceforprotocoltestingandperformanceanalysis. pclAnetworkinterfacedriverfortheDECPCL-11Bcommunicationscontroller. psAdriverforanEvansandSutherlandPictureSystem2graphicsdeviceconnected withaDMAinterface. ptyNowincludesasimplepacketprotocoltosupportflowcontrolledoperationwith mechanismsforflushingdatatobereadand/orwritten.

-14-rxAdriverfortheDECdualRX02floppydiskunit. tsNowsupportsTU80tapedrives. tuTheVAX-11/750consolecassetteinterfacehasbeenmadesomewhatusablewhen operatinginsingle-usermode.Thedevicedriveremploysassemblylanguagepseudo-dmacodeforthereceptionofincomingpacketsfromthecassette. udaNowsupportsRA81,RA80,andRA60diskdrives. unAnetworkinterfacedriverforanUngermann-Bassnetworkinterfaceunitconnected tothehostviaaDR-11W. upNowsupportsECCcorrectionandbadsectorhandling.Alsohasimprovedlogicfor recognizingmanydifferentkindsofdiskdrivesautomaticallyatboottime. uuAdriverforDECdualTU58tapecartridgesconnectedviaaDL-11Winterface. vaTheVariandriverhasbeenrewrittensothatitmaycoexistonthesameUNIBUS withdeviceswhichrequireexclusiveuseofthebus;i.e.RK07’s. vvAnetworkinterfacedriverfortheProteonproNET10Mb/sringnetworkcontroller. Section5 dirReflectsthenewdirectoryformat. disktabIsanewfileformaintainingdiskgeometryinformation.Thisisatemporaryscheme untiltheinformationstoredinthisfileforeachdiskisrecordedonthediskpack itself. dumpIsasupersetofthatusedin4.1BSD. fsReflectsthenewfilesystemorganization. gettytabIsanewfilewhichidescribesterminalcharacteristics.Eachentryinthefiledescribes oneofthepossibleargumentstothegettyprogram. hostsIsadatabaseformappingbetweenhostnamesandDARPAInternethostaddresses. mtabHasbeenmodifiedtoincludea‘‘type’’fieldindicatingwhetherthefilesystemis mountedread-only,read-write,orread-writewithdiskquotasenabled. networksIsadatabaseformappingbetweennetworknamesandDARPAstandardnetwork numbers. phonesIsaphonenumberdatabasefortip. printcapIsatermcapcloneforconfiguringprinters. protocolsIsadatabaseformappingbetweenprotocolnamesandDARPAInternetworkstandardprotocolnumbers. remoteIsadatabaseofremotehostsforusewithtip. servicesIsadatabaseinwhichDARPAInternetservicesarerecorded.Theinformationcontainedinthisfileindicatesthenameoftheservice,theprotocolwhichisrequiredto accessit,andtheportnumberatwhichaclientshouldconnecttoutilizetheservice. tarIsanewentrydescribingtheformatofatartape. utmpHasbeenaugmentedtoincludearemotehostfromwhichaloginsessionoriginates. ThewtmpfileisalsousedtorecordFTPsessions. vgrindefsIsafiledescribinghowtovgrindprogramswritteninmanylanguages. Section6 aardvarkDoesnotworkbecauseitrequiresthe‘‘DungeonDefinitionLanguage’’processor whichisabinaryimagerequiring4.1BSDcompatibilitymode;theDDLsourceisstill -15-present. aliensThealienshavereturnedhome,thegameisnolongerincludedinthedistribution. backgammon Isnowscreenoriented.Anewprogram,teachgammon,instructsthenewbackgammonplayer.Theoldversionisnowcalledbtlgammon. canfieldIsanewgamewhichplaysabrandofthepopulargameofsolitaire.Bettingis included,theprogramcfscoresmaybeusedtofindoutyourcurrentdebt. chingNowpipesitsoutputthroughmore.Thusthehackerplacatestheseekers. chaseNolongerexistsbecausethebinarydoesnotworkunder4.2BSD. factorIsarewriteinCoftheoldversion7assemblylanguageprogramwhichfindsthe primefactorsofanumber. fortuneHasyetmoreadages. hangmanIsnowscreenoriented. milleNowplaysmoreintelligently. primesIsarewriteinCoftheoldversion7assemblylanguageprogramwhichfindsprime numberswithinaspecifiedrange. rogueHasbeenmademoreofascoundrel.Thesupplementarydocument‘‘AGuidetothe DungeonsofDoom’’,hasbeenupdatedaswell,andisnowpartofVolume2Cofthe programmer’smanual. sailIsanewgamewhichsimulatesseabattlesofyore.Themanualpageislargeenough tobeaseparatedocumentandsohasbeenleftinitssourcedirectory. trekTheoriginaltrekhasreturned;trekiesrejoice. Section7 hierHasbeenupdatedtoreflectthereorganizationtotheuserandsystemsource. mailaddrIsanewentrydescribingmailaddressingsyntaxundersendmail(possiblytooBerkeleyspecific). msThe−msmacroshavebeenextendedtoallowautomaticcreationofatableofcontents.Supportforthereferpreprocessorisimproved.Severalbugsrelatedtomulticolumnoutputandfloatingkeepshavebeenfixed.Extensionstotheaccentmark stringsetareavailablebyincludingthe.AMmacro.Footnotescannowbeautomaticallynumbered(insuperscript)by−msandreferencedinthetextwitha\**string register.Themanualpageincludesasummaryofimportantnumberandstringregisters.Anewdocument‘‘Changesto−ms’’isincludedinVolume2Coftheprogrammer’smanual. Section8 Majorchangesaffectingsystemoperationsinclude: •Thesystemnowsupportsdiskquotas.Theseallowsystemadministratorstocontrolusers’ diskspaceandfileallocationonaper-filesystembasis.Utilitiesinthissectionexistforfixing, summarizing,andeditingdiskquotasummaryfiles. •Filesystemsarenowmadewithanewprogram,newfs,whichactsasfrontendtotheoldmkfs program.Therenolongerisaneedtorememberdiskpartitionsizes,asnewfsgetsthisinformationautomaticallyfromthe/etc/disktabfile.Inaddition,newfsattemptstolayoutfile systemsaccordingtothecharacteristicsoftheunderlyingdiskdrive(takingintoaccountdisk geometryinformation). •DECstandardbadblockforwardingisnowsupportedontheRP06andsecondvendor UNIBUSstoragemoduledisks.Thebad144programcannowbeusedtomarksectorsbadon -16-manydisks,thoughinclusioninthebadsectortableisstillsomewhatriskyduetorequire-mentsintheorderingofentriesinthetable. •Anewprogram,format,shouldbeusedtoinitializeallnon-DECstoragemodulesbeforecreat-ingfilesystems.Formatformatsthesectorheadersandcreatesabadsectortablewhichis usedinnormalsystemoperation.Formatrunsinastandalonemode. •Gettyhasbeenrewrittentouseadescriptionfile,/etc/gettytab.Thisallowssitestotailor terminaloperationandconfigurationwithoutmakingmodificationstogetty. •Thelineprintersystemistotallynew.Aprogramtoadministertheoperationofprinters,lpc, issupplied,andprinteraccountinghasbeenconsolidatedintoasingleprogram,pac. •Theprogramusedtorestorefilesfromdumptapesisnowcalledrestore.Thisnamechange wasdonetoreinforcethefactthatitiscompletelyrewrittenandoperatesinaverydifferent waythantheoldrestorprogram.Restoreoperatesonmountedfilesystemsandusesonlynormalfilesystemoperationstorestorefiles.Versionsofbothdumpandrestorewhichoperate acrossanetworkareincludedasrdumpandrrestore.Dumpandrestore(andtheirnetwork orientedcounterparts)nowperformsoefficiently(mostlybecauseofthenewfilesystem),that disktodiskbackupsshouldnolongerbeanattractivealternative. arffNolongerasksifyouwanttoclobberthefloppywhenmanipulatingarchiveswhich arenotonthefloppy. bad144Hasbeenmodifiedtousethe/etc/disktabfile.Canbeusedtocreatebadsector tablesfortheDECRP06andseveralnewWinchesterdiskdrives.Consultthesource codefordetailsandusewithextremecare. badsectHasbeenmodifiedtoworkwiththenewfilesystemandnowmustinteractwithfsck toperformitsduties.Consultthemanualpageformoreinformation. bugfilerIsanewprogramforautomaticfilingandacknowledgementofbugreportssubmitted bythesendbugprogram.IntendedtooperatewiththeRandMHsoftwarewhichis partoftheusercontributedsoftware.UsedatBerkeleytoprocessbugreportson 4.2BSD. chgrpHasbeenmovedtosection1. comsatHasbeenchangedtofilterthenoiselinesinmessageheaderswhendisplayingincomingmail.Nolongerusesasecondprocesswatchdogasitusesthemorereliable socketfacilitiesinsteadoftheoldmpxfacilities. configHasbeenextensivelymodifiedtohandlethenewrootandswapdevicespecification syntax.Anewdocument,‘‘Configuring4.2BSDUNIXSystemswithConfig’’, describesitsuse,aswellasotherimportantinformationneededinconfiguringsystem images;thisispartofVolume2Coftheprogrammer’smanual. diskpartIsanewprogramwhichmaybeusedtogeneratediskpartitiontablesaccordingto therulesusedatBerkeley.Canautomaticallygenerateentriesrequiredfordevice driversandforthe/etc/diskpartfile.(DoesnothandlethenewDECDSAstyle drivesproperlybecauseittriestoreservespaceforthebadsectortable.) drtestIsanewstandaloneprogramwhichisusefulintestingstandalonediskdevicedrivers andforpinpointingbadsectorsonadisk. dumpHasbeenmodifiedforthenewfilesystemorganization.Mainlyduetothenewfile system,itrunsvirtuallyattapespeed.Properlyhandleslockingonthedumpdates filewhenmultipledumpsareperformedconcurrentlyonthesamemachine. dumpfsIsanewprogramfordumpingoutinformationaboutafilesystemsuchastheblock sizeanddisklayoutinformation. edquotaIsanewprogramforeditinguserquotas.Operatesbyinvokingyourfavoriteeditor onanASCIIrepresentationoftheinformationstoredinthebinaryquotafiles.

-17-Edquotaalsohasa‘‘replication’’modewherebyaquotatemplatemaybeusedtocre-atequotasforagroupofusers. fastbootIsanewshellscriptwhichrebootsthesystemwithoutcheckingthefilesystems; shouldbeusedwithextremecare. fasthaltIsanewscriptwhichissimilartofastboot. formatIsanewstandaloneprogramforformattingnon-DECstoragemodulesandcreating theappropriatebadsectortableonthedisk. fsckHasbeenchangedforthenewfilesystem.Fsckismoreparanoidtheneverincheckingthedisks,andhasbeenspedupsignificantly.TheaccompanyingVolume2Cdocumenthasbeenupdatedtoreflectthenewfilesystemorganization. ftpdIstheDARPAFileTransferProtocolserverprogram.ItsupportsCshellstyleglobbingofargumentsandalargesetofthecommandsinthespecification(exceptthe ABORTcommand!). gettableIsanewprogramwhichcanbeusedinaquiringuptodateDARPAInternethost databasefiles. gettyHasbeenrewrittentouseaterminaldescriptiondatabase,/etc/gettytab.Consult themanualentriesforgetty(8)andgettytab(5)formoreinformation. icheckHasbeenmodifiedforthenewfilesystem. initHasbeensignificantlymodifiedtousethenewsignalfacilities.Indoingso,several raceconditionsrelatedtosignaldeliveryhavebeenfixed. kgmonIsanewprogramforcontrollingrunningsystemswhichhavebeencreatedwithkernelprofiling.Usingkgmon,profilingcanbeturnedonoroffandinternalprofiling bufferscandumpedintoagmon.outfilesuiitableforinterpretationbygprof. lpcIsanewprogramcontrollinglineprintersandtheirassociatedspoolingqueues.Lpc canbeusedtoenableanddisableprintersand/ortheirspoolingqueues.Lpccanalso beusedtorearrangeexistingjobsinaqueue. lpdHasbeenrewrittenandnowrunsasa‘‘server’’,usingtheinterprocesscommunication facilitiestoserviceprintrequests.Asupplementarydocumentdescribingtheline printersystemisnowpartofVolume2Coftheprogrammer’smanual. MAKEDEV Isanewshellscriptwhichresidesin/devandisusedtocreatespecialfilesthere. MAKEDEVkeepscommandsforcreatingandmanipulatinglocaldevicesinaseparatefileMAKEDEV.local. mkfsHasbeenvirtuallyrewrittenforthenewfilesystem.Theargumentssuppliedare verydifferent.Forthemostpart,usersnowusethenewfsprogramwhencreatingfile systems.Mkfsnowautomaticallycreatesthelost+founddirectory. mountNowindicatesfilesystemswhicharemountedread-onlyorhavediskquotasenabled. newfsIsanewfront-endtothemkfsprogram.Newfsfiguresouttheappropriateparame-terstosupplytomkfs,invokesit,andthen,ifnecessary,installsthebootblocksnec-essarytobootstrapUNIXon11/750’s. pacIsanewprogramwhichcanbeusedtodoprinteraccountingonanyprinter.Itsubsumesthevpacprogram. quotNowusestheinformationintheinodeofeachfiletofindouthowmanyblocksare allocatedtoit. quotacheck Isanewprogramwhichperformsconsistencychecksondiskquotafiles.Quotacheck isnormallyrunfromthe/etc/rc.localfileafterasystemisrebooted,thoughitcan alsoberunonmountedonfilesystemswhicharenotinuse.

-18-quotaonIsanewprogramwhichenablesdiskquotasonfilesystems.Alinktoquotaon, namedquotaoff,isusedtodisablediskquotasonfilesystems. pstatHasbeenmodifiedtounderstandnewkerneldatastructures. rcHashadsystemdependentstartupcommandsmovedto/etc/rc.local. rdumpIsanewprogramtodumpfilesystemsacrossanetwork. reniceHasbeenrewrittentousethenewsetprioritysystemcall.Asaresult,youcannow reniceusersandprocessgroups. repquotaIsanewprogramwhichsummarizesdiskquotasononeormorefilesystems. restorNolongerexists.Anewprogram,restore,isitssuccessor. restoreReplacesrestor.Restoreoperatesonmountedfilesystems;itcontainsaninteractive modeandcanbeusedtorestorefilesbyname.Restorehasbecomealmostasflexible touseastarinretrievingfilesfromtape. rexecdIsanetworkserverfortherexec(3X)libraryroutine.Supportsremotecommandexecutionwhereauthenticationisperformedusinguseraccountsandpasswords. rlogindIsanetworkserverfortherlogin(1C)command.Supportsremoteloginsessions whereauthenticationisperformedusingprivilegedportnumbersandtwofiles, /etc/hosts.equivand.rhosts(ineachusershomedirectory). rmtIsaprogramusedbyrrestoreandrdumpfordoingremotetapeoperations. routeIsaprogramformanuallymanipulatingnetworkroutingtables. routedIsaroutingdaemonwhichusesavariantoftheXeroxRoutingInformationProtocol toautomaticallymaintainuptodateroutingtables. rrestoreIsaversionofrestorewhichworksacrossanetwork. rshdIsaserverforthersh(1C)command.Itsupportsremotecommandexecutionusing privilegedportnumbersandthe/etc/hosts.equivand.rhostsfilesinusers’home directories. rwhodIsaserverwhichgeneratesandlistensforhoststatusinformationonlocalnetworks. Theinformationstoredbyrwhodisusedbytherwho(1C)andruptime(1C)programs. rxformatIsaprogramforformattingfloppydisks(thisusestherxdevicedriver,nottheconsolefloppyinterface). savecoreHasbeenmodifiedtogetmanypiecesofinformationfromtherunningsystemand crashdumptoavoidcompiledinconstants. sendmailIsanewprogramreplacingdelivermail;itprovidesfullyinternetworkmailforwarding capabilities.SendmailusestheDARPAstandardSMTPprotocoltosendandreceive mail.Sendmailusesaconfigurationfiletocontrolitsoperation,eliminatingthecompiledindescriptionusedindelivermail. setifaddrIsanewprogramusedtosetanetworkinterface’saddress.Callstothisprogramare normallyplacedinthe/etc/rc.localfiletoconfigurethenetworkhardwarepresenton amachine. syslogIsaserverwhichreceivessystemloggingmessages.Currently,onlythesendmailprogramusesthisserver. telnetdIsaserverfortheDARPAstandardTELNETprotocol. tftpdIsaserverfortheDARPATrivialFileTransferProtocol. trptIsaprogramusedindebuggingTCP.Trpttransliteratesprotocoltraceinformation recordedbyTCPinacircularbufferinkernelmemory. tunefsIsaprogramformodifyingcertainparametersinthesuperblockoffilesystems. vipwIsnolongerashellscriptandproperlyinteractswithpasswd,chsh,andchfnin lockingthepasswordfile.