/usr/local/poudriere/data/packages/e24a8cae34360705d022f17584bb6b4507b8eb89-build1/All/zh_tw-freebsd-doc-48633,1.txz vs.
/usr/local/poudriere/data/packages/e24a8cae34360705d022f17584bb6b4507b8eb89-build2/All/zh_tw-freebsd-doc-48633,1.txz
zh_tw-freebsd-doc-48633,1.txz-content
file list
Offset 635, 40 lines modifiedOffset 635, 40 lines modified
635 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​·····​6069·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​porters-​handbook/​using-​sub-​files.​html635 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​·····​6069·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​porters-​handbook/​using-​sub-​files.​html
636 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​·····​5683·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​porters-​handbook/​using-​tcl.​html636 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​·····​5683·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​porters-​handbook/​using-​tcl.​html
637 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​····​22540·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​porters-​handbook/​using-​wx.​html637 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​····​22540·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​porters-​handbook/​using-​wx.​html
638 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​····​13649·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​porters-​handbook/​using-​x11.​html638 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​····​13649·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​porters-​handbook/​using-​x11.​html
639 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​·····​7150·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​porters-​handbook/​using-​xfce.​html639 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​·····​7150·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​porters-​handbook/​using-​xfce.​html
640 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​182568·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​porters-​handbook/​versions.​html640 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​182568·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​porters-​handbook/​versions.​html
641 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​·····​3178·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​porters-​handbook/​why-​port.​html641 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​·····​3178·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​porters-​handbook/​why-​port.​html
642 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​415625·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​contributing/​article.​pdf642 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​415617·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​contributing/​article.​pdf
643 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​188215·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​freebsd-​questions/​article.​pdf643 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​188216·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​freebsd-​questions/​article.​pdf
644 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​281779·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​hubs/​article.​pdf644 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​281772·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​hubs/​article.​pdf
645 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​180370·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​leap-​seconds/​article.​pdf645 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​180369·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​leap-​seconds/​article.​pdf
646 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​379919·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​mailing-​list-​faq/​article.​pdf646 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​379918·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​mailing-​list-​faq/​article.​pdf
647 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​275851·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​nanobsd/​article.​pdf647 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​275851·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​nanobsd/​article.​pdf
648 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​308213·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​pr-​guidelines/​article.​pdf648 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​308212·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​pr-​guidelines/​article.​pdf
649 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​218590·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​problem-​reports/​article.​pdf649 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​218596·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​problem-​reports/​article.​pdf
650 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​342592·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​remote-​install/​article.​pdf650 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​342594·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​remote-​install/​article.​pdf
651 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​··​1396986·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​developers-​handbook/​book.​pdf651 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​··​1396979·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​developers-​handbook/​book.​pdf
652 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​··​1010291·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​fdp-​primer/​book.​pdf652 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​··​1010246·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​fdp-​primer/​book.​pdf
653 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​·​13823771·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​handbook/​book.​pdf653 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​·​13822762·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​handbook/​book.​pdf
654 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​··​2022357·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​porters-​handbook/​book.​pdf654 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​··​2022356·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​porters-​handbook/​book.​pdf
655 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​415625·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​contributing/​article.​ps655 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​415617·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​contributing/​article.​ps
656 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​188215·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​freebsd-​questions/​article.​ps656 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​188216·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​freebsd-​questions/​article.​ps
657 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​281779·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​hubs/​article.​ps657 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​281772·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​hubs/​article.​ps
658 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​180370·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​leap-​seconds/​article.​ps658 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​180369·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​leap-​seconds/​article.​ps
659 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​379919·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​mailing-​list-​faq/​article.​ps659 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​379918·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​mailing-​list-​faq/​article.​ps
660 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​275851·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​nanobsd/​article.​ps660 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​275851·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​nanobsd/​article.​ps
661 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​308213·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​pr-​guidelines/​article.​ps661 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​308212·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​pr-​guidelines/​article.​ps
662 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​218590·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​problem-​reports/​article.​ps662 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​218596·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​problem-​reports/​article.​ps
663 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​342592·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​remote-​install/​article.​ps663 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​···​342594·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​remote-​install/​article.​ps
664 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​··​1396986·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​developers-​handbook/​book.​ps664 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​··​1396979·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​developers-​handbook/​book.​ps
665 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​··​1010291·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​fdp-​primer/​book.​ps665 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​··​1010246·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​fdp-​primer/​book.​ps
666 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​·​13823771·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​handbook/​book.​ps666 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​·​13822762·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​handbook/​book.​ps
667 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​··​2022357·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​porters-​handbook/​book.​ps667 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​··​2022356·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​books/​porters-​handbook/​book.​ps
668 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​····​18935·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​contributing/​article.​txt668 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​····​18935·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​contributing/​article.​txt
669 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​····​21307·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​freebsd-​questions/​article.​txt669 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​····​21307·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​freebsd-​questions/​article.​txt
670 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​····​30164·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​hubs/​article.​txt670 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​····​30164·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​hubs/​article.​txt
671 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​·····​2773·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​leap-​seconds/​article.​txt671 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​·····​2773·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​leap-​seconds/​article.​txt
672 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​····​23844·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​mailing-​list-​faq/​article.​txt672 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​····​23844·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​mailing-​list-​faq/​article.​txt
673 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​·····​9373·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​nanobsd/​article.​txt673 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​·····​9373·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​nanobsd/​article.​txt
674 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​····​27815·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​pr-​guidelines/​article.​txt674 -​r-​-​r-​-​r-​-​···​0·​root·········​(0)​·​wheel········​(0)​····​27815·​2016-​04-​21·​19:​48:​20.​000000·​/​usr/​local/​share/​doc/​freebsd/​zh_TW.​UTF-​8/​articles/​pr-​guidelines/​article.​txt
+COMPACT_MANIFEST
Offset 1, 1 lines modifiedOffset 1, 1 lines modified
1 {"name":​"zh_tw-​freebsd-​doc",​"origin":​"misc/​freebsd-​doc-​zh_tw",​"version":​"48633,​1",​"comment":​"Traditional·​Chinese·​translation·​of·​the·​FreeBSD·​Documentation·​Project",​"maintainer":​"doceng@FreeBSD.​org",​"www":​"UNKNOWN",​"abi":​"FreeBSD:​11:​*",​"arch":​"freebsd:​11:​*",​"prefix":​"/​usr/​local",​"flatsize":​71683405,​"licenselogic":​"single",​"desc":​"The·​whole·​documentation·​set·​from·​the·​FreeBSD·​Documentation·​Project:​\nHandbook,​·​FAQ,​·​articles·​and·​more.​",​"categories":​["misc",​"docs"],​"options":​{"HTML":​"on",​"HTML_SPLIT":​"on",​"PDF":​"on",​"PS":​"on",​"TXT":​"on"}}1 {"name":​"zh_tw-​freebsd-​doc",​"origin":​"misc/​freebsd-​doc-​zh_tw",​"version":​"48633,​1",​"comment":​"Traditional·​Chinese·​translation·​of·​the·​FreeBSD·​Documentation·​Project",​"maintainer":​"doceng@FreeBSD.​org",​"www":​"UNKNOWN",​"abi":​"FreeBSD:​11:​*",​"arch":​"freebsd:​11:​*",​"prefix":​"/​usr/​local",​"flatsize":​71681263,​"licenselogic":​"single",​"desc":​"The·​whole·​documentation·​set·​from·​the·​FreeBSD·​Documentation·​Project:​\nHandbook,​·​FAQ,​·​articles·​and·​more.​",​"categories":​["misc",​"docs"],​"options":​{"HTML":​"on",​"HTML_SPLIT":​"on",​"PDF":​"on",​"PS":​"on",​"TXT":​"on"}}
+MANIFEST
... load diff ...
/usr/local/share/doc/freebsd/zh_TW.UTF-8/articles/contributing/article.html
Offset 1, 19 lines modifiedOffset 1, 19 lines modified
1 <?xml·​version="1.​0"·​encoding="utf-​8"?>1 <?xml·​version="1.​0"·​encoding="utf-​8"?>
2 <!DOCTYPE·​html·​PUBLIC·​"-​/​/​W3C/​/​DTD·​XHTML·​1.​0·​Transitional/​/​EN"·​"http:​/​/​www.​w3.​org/​TR/​xhtml1/​DTD/​xhtml1-​transitional.​dtd"><html·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"><head><meta·​http-​equiv="Content-​Type"·​content="text/​html;​·​charset=utf-​8"·​/​><title>幫助·​FreeBSD</​title><link·​rel="stylesheet"·​type="text/​css"·​href="docbook.​css"·​/​><link·​rev="made"·​href="mailto:​doc@FreeBSD.​org"·​/​><meta·​name="generator"·​content="DocBook·​XSL·​Stylesheets·​V1.​78.​1"·​/​><meta·​name="description"·​content="無論是個人或是各種組織,​如果希望為·​FreeBSD·​提供幫助,都可以在本文中找到合適的方法。"​·​/​><script·​xmlns=""·​type="text/​javascript"·​src="/​layout/​js/​google.​js"></​script></​head><body><div·​xml:​lang="zh_tw"·​class="article"·​lang="zh_tw"><div·​xmlns=""·​class="titlepage"><di​v><div><h1·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60856760"></​a>幫助·​FreeBSD</​h1></​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="authorgroup"><​div·​class="author"><h3·​class="author"><span·​class="firstname">Jor​dan</​span>·​<span·​class="surname">Hubba​rd</​span></​h3><span·​class="contrib">原著:·​</​span>·​✂2 <!DOCTYPE·​html·​PUBLIC·​"-​/​/​W3C/​/​DTD·​XHTML·​1.​0·​Transitional/​/​EN"·​"http:​/​/​www.​w3.​org/​TR/​xhtml1/​DTD/​xhtml1-​transitional.​dtd"><html·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"><head><meta·​http-​equiv="Content-​Type"·​content="text/​html;​·​charset=utf-​8"·​/​><title>幫助·​FreeBSD</​title><link·​rel="stylesheet"·​type="text/​css"·​href="docbook.​css"·​/​><link·​rev="made"·​href="mailto:​doc@FreeBSD.​org"·​/​><meta·​name="generator"·​content="DocBook·​XSL·​Stylesheets·​V1.​78.​1"·​/​><meta·​name="description"·​content="無論是個人或是各種組織,​如果希望為·​FreeBSD·​提供幫助,都可以在本文中找到合適的方法。"​·​/​><script·​xmlns=""·​type="text/​javascript"·​src="/​layout/​js/​google.​js"></​script></​head><body><div·​xml:​lang="zh_tw"·​class="article"·​lang="zh_tw"><div·​xmlns=""·​class="titlepage"><di​v><div><h1·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60815800"></​a>幫助·​FreeBSD</​h1></​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="authorgroup"><​div·​class="author"><h3·​class="author"><span·​class="firstname">Jor​dan</​span>·​<span·​class="surname">Hubba​rd</​span></​h3><span·​class="contrib">原著:·​</​span>·​✂
3 ··​Inc.​·​在美國的註冊商標。</​p><p>許多製造商和經銷商使用一些稱為商​標的圖案或文字設計來彰顯自己的產品。3 ··​Inc.​·​在美國的註冊商標。</​p><p>許多製造商和經銷商使用一些稱為商​標的圖案或文字設計來彰顯自己的產品。
4 ··​本文中出現的眾多商標,以及·​FreeBSD·​Project·​本身廣所人知的商標,後面將以·​'™'·​或·​'®'·​符號來標註。</​p></​div></​div><div>··​2014-​05-​29·​由·​lwhsu.​</​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="abstract"><div​·​class="abstract-​title">摘要</​div><p>無論是個人或是各種組織,如果​希望為·​FreeBSD·​提供幫助,都可以在本文中找到合適的方法。<​/​p></​div></​div></​div><div·​class="docformatnavi"​>4 ··​本文中出現的眾多商標,以及·​FreeBSD·​Project·​本身廣所人知的商標,後面將以·​'™'·​或·​'®'·​符號來標註。</​p></​div></​div><div>··​2014-​05-​29·​由·​lwhsu.​</​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="abstract"><div​·​class="abstract-​title">摘要</​div><p>無論是個人或是各種組織,如果​希望為·​FreeBSD·​提供幫助,都可以在本文中找到合適的方法。<​/​p></​div></​div></​div><div·​class="docformatnavi"​>
5 ······​[5 ······​[
6 ······​<a·​href="index.​html">章節模式</​a>6 ······​<a·​href="index.​html">章節模式</​a>
7 ······​/​7 ······​/​
8 ······8 ······
9 »       ​··​完整模式9 »       ​··​完整模式
10 »       ​10 »       ​
11 ······​]11 ······​]
12 ····​</​div><hr·​/​></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="sect1"><a·​href="#contrib-​what">1.​·​我們的需求</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#contrib-​how">2.​·​如何提供幫助</​a></​span></​dt><dt><span·​class="index"><a·​href="#idp59594168">索​引</​a></​span></​dt></​dl></​div><a·​id="idp58144824"·​class="indexterm"></​a><p>你希望替·​FreeBSD·​做點什麼嗎?太好了,我們歡迎你。FreeB​SD12 ····​</​div><hr·​/​></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="sect1"><a·​href="#contrib-​what">1.​·​我們的需求</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#contrib-​how">2.​·​如何提供幫助</​a></​span></​dt><dt><span·​class="index"><a·​href="#idp59547448">索​引</​a></​span></​dt></​dl></​div><a·​id="idp58161464"·​class="indexterm"></​a><p>你希望替·​FreeBSD·​做點什麼嗎?太好了,我們歡迎你。FreeB​SD
13 ····​正是有賴於廣大使用者的貢獻才得以發展壯大的​。我們不僅非常感謝您所做的貢獻,而且,這些​工作對於·​FreeBSD·​的持續發展也至關重要。</​p><p>也許與您想像的不同,您既不必得是​一名出色的·​Programmer,也無須和13 ····​正是有賴於廣大使用者的貢獻才得以發展壯大的​。我們不僅非常感謝您所做的貢獻,而且,這些​工作對於·​FreeBSD·​的持續發展也至關重要。</​p><p>也許與您想像的不同,您既不必得是​一名出色的·​Programmer,也無須和
14 ····​FreeBSD·​core·​team·​成員有很好的私交,我們會一視同仁的對待您的​工作。14 ····​FreeBSD·​core·​team·​成員有很好的私交,我們會一視同仁的對待您的​工作。
15 ····​FreeBSD·​的開發人員遍布全球,大家技術專長各異,年齡​分布也非常廣泛。15 ····​FreeBSD·​的開發人員遍布全球,大家技術專長各異,年齡​分布也非常廣泛。
16 ····​然而,每天我們都在面對持續增加的工作,而苦​於沒有足夠的人手,因此我們隨時歡迎您的幫助​。</​p><p>FreeBSD·​計劃所處理的是一個完整的作業系統環境,而不​只是一個·​kernel·​或是一些零散的工具包。16 ····​然而,每天我們都在面對持續增加的工作,而苦​於沒有足夠的人手,因此我們隨時歡迎您的幫助​。</​p><p>FreeBSD·​計劃所處理的是一個完整的作業系統環境,而不​只是一個·​kernel·​或是一些零散的工具包。
17 »       ​因此,我們的·​<code·​class="filename">TODO​</​code>·​待辦任務列表裡包含各式各樣的工作:17 »       ​因此,我們的·​<code·​class="filename">TODO​</​code>·​待辦任務列表裡包含各式各樣的工作:
18 ····​從文件、使用者測試、demo,到系統安裝程​式和更專業的·​kernel·​開發。18 ····​從文件、使用者測試、demo,到系統安裝程​式和更專業的·​kernel·​開發。
19 ····​因此無論您的技術水準如何,從事何種領域,都​可以幫助這個計劃。</​p><p>我們鼓勵從事和·​FreeBSD·​相關工作的企業和我們聯繫。19 ····​因此無論您的技術水準如何,從事何種領域,都​可以幫助這個計劃。</​p><p>我們鼓勵從事和·​FreeBSD·​相關工作的企業和我們聯繫。
Offset 58, 24 lines modifiedOffset 58, 24 lines modified
58 »       ​····​<code·​class="filename">mall​oc.​h</​code>·​所產生的警告。</​p></​li><li·​class="listitem"><p>如​果有為·​ports·​作了任何修正,58 »       ​····​<code·​class="filename">mall​oc.​h</​code>·​所產生的警告。</​p></​li><li·​class="listitem"><p>如​果有為·​ports·​作了任何修正,
59 »       ​····​請記得將您的·​patch·​發給原作者·​(這樣下次升級時,您的工作會變得輕鬆一些)​。</​p></​li><li·​class="listitem"><p>先​取得正式的標準,如·​<span·​class="trademark">POS​IX</​span>®·​的副本。59 »       ​····​請記得將您的·​patch·​發給原作者·​(這樣下次升級時,您的工作會變得輕鬆一些)​。</​p></​li><li·​class="listitem"><p>先​取得正式的標準,如·​<span·​class="trademark">POS​IX</​span>®·​的副本。
60 »       ​····​在·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​projects/​c99/​index.​html"·​target="_top">FreeBSD​60 »       ​····​在·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​projects/​c99/​index.​html"·​target="_top">FreeBSD​
61 »       ​····​C99·​&amp;​·​POSIX·​標準相容計劃</​a>·​網站上,可以得到相關鏈接。61 »       ​····​C99·​&amp;​·​POSIX·​標準相容計劃</​a>·​網站上,可以得到相關鏈接。
62 »       ​····​請將·​FreeBSD·​的行為與上述的標準進行比較,若所得結果與·​C99·​&amp;​·​POSIX·​標準不同的話,62 »       ​····​請將·​FreeBSD·​的行為與上述的標準進行比較,若所得結果與·​C99·​&amp;​·​POSIX·​標準不同的話,
63 »       ​····​特別是那些細節地方的微小差異,請發一個關於​它的·​PR·​(問題報告)​。63 »       ​····​特別是那些細節地方的微小差異,請發一個關於​它的·​PR·​(問題報告)​。
64 »       ​····​如果可能,請指出如何修正它,並隨·​PR·​提交·​patch·​。64 »       ​····​如果可能,請指出如何修正它,並隨·​PR·​提交·​patch·​。
65 »       ​····​如果您認為標準有問題,請向這些規格標準的相​關團體,請求對其進行重新的考慮。</​p></​li><li·​class="listitem"><p>為​這份列表提供更多建議!</​p></​li></​ol></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59339576"></​a>1.​3.​·​查閱整個·​PR·​資料庫</​h3></​div></​div></​div><a·​id="idp59342136"·​class="indexterm"></​a><p><a·​class="link"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​query-​pr-​summary.​cgi"·​target="_top">FreeBSD​65 »       ​····​如果您認為標準有問題,請向這些規格標準的相​關團體,請求對其進行重新的考慮。</​p></​li><li·​class="listitem"><p>為​這份列表提供更多建議!</​p></​li></​ol></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59179320"></​a>1.​3.​·​查閱整個·​PR·​資料庫</​h3></​div></​div></​div><a·​id="idp59292472"·​class="indexterm"></​a><p><a·​class="link"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​query-​pr-​summary.​cgi"·​target="_top">FreeBSD​
66 »       ​PR·​列表</​a>·​這裡會顯示目前所有·​PR·​的問題狀態,以及由66 »       ​PR·​列表</​a>·​這裡會顯示目前所有·​PR·​的問題狀態,以及由
67 »       ​FreeBSD·​使用者提交的改進建議。67 »       ​FreeBSD·​使用者提交的改進建議。
68 »       ​PR·​資料庫同時包括了開發人員和非開發人員的任務​。68 »       ​PR·​資料庫同時包括了開發人員和非開發人員的任務​。
69 »       ​查看那些尚未解決的·​PR,並看看是否有您感興趣的任務。69 »       ​查看那些尚未解決的·​PR,並看看是否有您感興趣的任務。
70 »       ​這其中可能有一些是非常簡單的問題,只需要看​一看並確認·​PR·​是正確的。70 »       ​這其中可能有一些是非常簡單的問題,只需要看​一看並確認·​PR·​是正確的。
71 »       ​另外一些可能會非常複雜,或者完全未附任何修​正。</​p><p>首先看一看那些還沒有人接手的·​PR。71 »       ​另外一些可能會非常複雜,或者完全未附任何修​正。</​p><p>首先看一看那些還沒有人接手的·​PR。
72 »       ​如果·​PR·​已經分配給了其它人,但看起來是您能夠處理的​,72 »       ​如果·​PR·​已經分配給了其它人,但看起來是您能夠處理的​,
73 »       ​您可以寄信給那個人,並詢問您是否可以提供幫​助·​——73 »       ​您可以寄信給那個人,並詢問您是否可以提供幫​助·​——
74 »       ​他們可能已經有可供測試的·​patch·​,或有一些可供討論的意見。</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59347384"></​a>1.​4.​·​由·​<span·​class="quote">“<span·​class="quote">Ideas</​span>”</​span>·​中選一項</​h3></​div></​div></​div><p><a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​projects/​ideas/​"·​target="_top">FreeBSD​·​list·​of74 »       ​他們可能已經有可供測試的·​patch·​,或有一些可供討論的意見。</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59296696"></​a>1.​4.​·​由·​<span·​class="quote">“<span·​class="quote">Ideas</​span>”</​span>·​中選一項</​h3></​div></​div></​div><p><a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​projects/​ideas/​"·​target="_top">FreeBSD​·​list·​of
75 »       ​projects·​and·​ideas·​for·​volunteers</​a>·​同樣地開放給有意願參與75 »       ​projects·​and·​ideas·​for·​volunteers</​a>·​同樣地開放給有意願參與
76 »       ​FreeBSD·​計劃的人。76 »       ​FreeBSD·​計劃的人。
77 »       ​這份清單將持續地更新,同時提供各個項目的資​訊給所有人77 »       ​這份清單將持續地更新,同時提供各個項目的資​訊給所有人
78 »       ​(不論是否為程式設計人員)。</​p></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="contrib-​how"></​a>2.​·​如何提供幫助</​h2></​div></​div></​div><p>基本上可以分為以下·​5·​種方式:</​p><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="contrib-​general"></​a>2.​1.​·​錯誤報告和意見發表</​h3></​div></​div></​div><p>通常,<span·​class="emphasis"><em>​一般</​em></​span>78 »       ​(不論是否為程式設計人員)。</​p></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="contrib-​how"></​a>2.​·​如何提供幫助</​h2></​div></​div></​div><p>基本上可以分為以下·​5·​種方式:</​p><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="contrib-​general"></​a>2.​1.​·​錯誤報告和意見發表</​h3></​div></​div></​div><p>通常,<span·​class="emphasis"><em>​一般</​em></​span>
79 »       ​的技術想法和建議應該發到·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​hackers"·​target="_top">FreeBSD​·​technical·​discussions·​郵遞論壇</​a>。79 »       ​的技術想法和建議應該發到·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​hackers"·​target="_top">FreeBSD​·​technical·​discussions·​郵遞論壇</​a>。
80 »       ​同樣地,對於這些東西有興趣的人·​(當然,80 »       ​同樣地,對於這些東西有興趣的人·​(當然,
81 »       ​他們同時還要能夠容忍·​<span·​class="emphasis"><em>​大量的</​em></​span>·​郵件!)​81 »       ​他們同時還要能夠容忍·​<span·​class="emphasis"><em>​大量的</​em></​span>·​郵件!)​
Offset 96, 32 lines modifiedOffset 96, 32 lines modified
96 »       ​請保留這個編號,因為事後可以用這編號發信到​·​<code·​class="email">&lt;​<a·​xmlns=""·​class="email"·​href="mailto:​bug-​followup@FreeBSD.​org">bug-​followup@FreeBSD.​org</​a>&gt;​</​code>96 »       ​請保留這個編號,因為事後可以用這編號發信到​·​<code·​class="email">&lt;​<a·​xmlns=""·​class="email"·​href="mailto:​bug-​followup@FreeBSD.​org">bug-​followup@FreeBSD.​org</​a>&gt;​</​code>
97 »       ​來回覆、提供關於該事件的後續資料。您需要做​的是將編號放到郵件的標題中,97 »       ​來回覆、提供關於該事件的後續資料。您需要做​的是將編號放到郵件的標題中,
98 »       ​例如··​<code·​class="literal">"Re:​98 »       ​例如··​<code·​class="literal">"Re:​
99 »       ​kern/​3377"</​code>。99 »       ​kern/​3377"</​code>。
100 »       ​若是同一問題的回覆方面,應該透過這種方式來​進行。</​p><p>如果您在一段時間·​(超過·​3·​天甚至·​1·​週,這取決於您的郵件服務)​之後仍然沒有收到確認信100 »       ​若是同一問題的回覆方面,應該透過這種方式來​進行。</​p><p>如果您在一段時間·​(超過·​3·​天甚至·​1·​週,這取決於您的郵件服務)​之後仍然沒有收到確認信
101 »       ​或者由於一些原因無法使用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​程式,101 »       ​或者由於一些原因無法使用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​程式,
102 »       ​則可以發信到·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​bugs"·​target="_top">FreeBSD​·​problem·​reports·​郵遞論壇</​a>·​來請別人幫你代寄。</​p><p>請參閱·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​problem-​reports/​article.​html"·​target="_top">這篇文章</​a>102 »       ​則可以發信到·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​bugs"·​target="_top">FreeBSD​·​problem·​reports·​郵遞論壇</​a>·​來請別人幫你代寄。</​p><p>請參閱·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​problem-​reports/​article.​html"·​target="_top">這篇文章</​a>
103 ··»       ​了解如何撰寫好的問題報告。</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59400888"></​a>2.​2.​·​對於文件的修訂</​h3></​div></​div></​div><a·​id="idp59402552"·​class="indexterm"></​a><p>文件的修改方面,是由·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​doc"·​target="_top">FreeBSD​·​documentation·​project·​郵遞論壇</​a>·​來審查。103 ··»       ​了解如何撰寫好的問題報告。</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59350328"></​a>2.​2.​·​對於文件的修訂</​h3></​div></​div></​div><a·​id="idp59351736"·​class="indexterm"></​a><p>文件的修改方面,是由·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​doc"·​target="_top">FreeBSD​·​documentation·​project·​郵遞論壇</​a>·​來審查。
104 »       ​請參閱·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​books/​fdp-​primer/​index.​html"·​target="_top">FreeBSD​·​Documentation·​Project·​Primer</​a>104 »       ​請參閱·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​books/​fdp-​primer/​index.​html"·​target="_top">FreeBSD​·​Documentation·​Project·​Primer</​a>
105 »       ​來獲得完整的教學細節。105 »       ​來獲得完整的教學細節。
106 »       ​請按照·​<a·​class="xref"·​href="#contrib-​general"·​title="2.​1.​·​錯誤報告和意見發表">節 2.​1,​·​“錯誤報告和意見發表”</​a>·​中介紹的方法使用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>106 »       ​請按照·​<a·​class="xref"·​href="#contrib-​general"·​title="2.​1.​·​錯誤報告和意見發表">節 2.​1,​·​“錯誤報告和意見發表”</​a>·​中介紹的方法使用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>
107 »       ​來提交新的文件,或者改善現有的文件·​(哪怕是很小的改進也是歡迎的!)​。</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59411896"></​a>2.​3.​·​對於現有原始碼的修改</​h3></​div></​div></​div><a·​id="idp59414456"·​class="indexterm"></​a><p>在現有原始碼上進行修改或增加功能​,在某種程度上是需要更多技巧的事,107 »       ​來提交新的文件,或者改善現有的文件·​(哪怕是很小的改進也是歡迎的!)​。</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59362744"></​a>2.​3.​·​對於現有原始碼的修改</​h3></​div></​div></​div><a·​id="idp59365304"·​class="indexterm"></​a><p>在現有原始碼上進行修改或增加功能​,在某種程度上是需要更多技巧的事,
108 »       ​並且還跟您對於目前·​FreeBSD·​的開發現狀了解程度有關。108 »       ​並且還跟您對於目前·​FreeBSD·​的開發現狀了解程度有關。
109 »       ​有多種方式可以得到被稱作·​<span·​class="quote">“<span·​class="quote">FreeBSD​-​CURRENT</​span>”</​span>109 »       ​有多種方式可以得到被稱作·​<span·​class="quote">“<span·​class="quote">FreeBSD​-​CURRENT</​span>”</​span>
110 »       ​的·​FreeBSD·​開發版本。110 »       ​的·​FreeBSD·​開發版本。
111 »       ​請參閱·​FreeBSD·​使用手冊的·​<a·​class="link"·​href="··​.​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​books/​handbook/​current-​stable.​html"·​target="_top">相關部份</​a>·​,來了解使用·​FreeBSD-​CURRENT·​的詳情。</​p><p>在舊的原始碼上進行修改,則通常可​能原始碼已過時,111 »       ​請參閱·​FreeBSD·​使用手冊的·​<a·​class="link"·​href="··​.​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​books/​handbook/​current-​stable.​html"·​target="_top">相關部份</​a>·​,來了解使用·​FreeBSD-​CURRENT·​的詳情。</​p><p>在舊的原始碼上進行修改,則通常可​能原始碼已過時,
112 »       ​或與新的版本差異太大而無法被重新整合到·​FreeBSD·​中。112 »       ​或與新的版本差異太大而無法被重新整合到·​FreeBSD·​中。
113 »       ​如果您有訂·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​announce"·​target="_top">FreeBSD​·​announcements·​郵遞論壇</​a>·​以及·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​current"·​target="_top">FreeBSD​-​CURRENT·​郵遞論壇</​a>·​的話,113 »       ​如果您有訂·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​announce"·​target="_top">FreeBSD​·​announcements·​郵遞論壇</​a>·​以及·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​current"·​target="_top">FreeBSD​-​CURRENT·​郵遞論壇</​a>·​的話,
114 »       ​則可以透過它們來大致了解目前的開發狀態。<​/​p><p>若您能夠儘量以最新的原始碼來進行​您的修改,114 »       ​則可以透過它們來大致了解目前的開發狀態。<​/​p><p>若您能夠儘量以最新的原始碼來進行​您的修改,
115 »       ​則下一步要做的事情就是產生您所修改的·​diff·​檔,115 »       ​則下一步要做的事情就是產生您所修改的·​diff·​檔,
116 »       ​並將它發給·​FreeBSD·​的維護人員。這項工作可以透過·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=diff&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>diff</​span>(1)​</​span></​a>116 »       ​並將它發給·​FreeBSD·​的維護人員。這項工作可以透過·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=diff&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>diff</​span>(1)​</​span></​a>
117 »       ​命令來完成。</​p><p>提交·​patch·​時,建議·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=diff&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>diff</​span>(1)​</​span></​a>·​格式採用·​unified·​diff·​(可以用·​<code·​class="command">diff117 »       ​命令來完成。</​p><p>提交·​patch·​時,建議·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=diff&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>diff</​span>(1)​</​span></​a>·​格式採用·​unified·​diff·​(可以用·​<code·​class="command">diff
118 ········​-​u</​code>·​來產生)​。不過,如果您修改了大量的原始碼,118 ········​-​u</​code>·​來產生)​。不過,如果您修改了大量的原始碼,
119 ········​則使用·​<code·​class="command">diff·​-​c</​code>·​來生成的·​context·​diff119 ········​則使用·​<code·​class="command">diff·​-​c</​code>·​來生成的·​context·​diff
120 ········​的·​diff·​可能更容易閱讀,因而推薦使用。一般而言,大​都是採用·​<code·​class="command">diff·​-​ruN</​code>·​即可。</​p><a·​id="idp59444664"·​class="indexterm"></​a><p>例如:</​p><p>120 ········​的·​diff·​可能更容易閱讀,因而推薦使用。一般而言,大​都是採用·​<code·​class="command">diff·​-​ruN</​code>·​即可。</​p><a·​id="idp59393592"·​class="indexterm"></​a><p>例如:</​p><p>
121 »       ​</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>diff·​-​c·​oldfile·​newfile</​code></​strong></​pre><p>121 »       ​</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>diff·​-​c·​oldfile·​newfile</​code></​strong></​pre><p>
  
122 »       ​或122 »       ​或
  
123 »       ​</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>diff·​-​c·​-​r·​olddir·​newdir</​code></​strong></​pre><p>123 »       ​</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>diff·​-​c·​-​r·​olddir·​newdir</​code></​strong></​pre><p>
  
124 »       ​將會對特定目錄,產生·​context·​的·​diff·​檔。</​p><p>或者像是.​.​.​124 »       ​將會對特定目錄,產生·​context·​的·​diff·​檔。</​p><p>或者像是.​.​.​
Offset 135, 32 lines modifiedOffset 135, 32 lines modified
135 »       ​中所介紹的·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​程式就可以完成這項工作。135 »       ​中所介紹的·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​程式就可以完成這項工作。
136 »       ​請注意:不要只把·​diff·​檔發到·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​hackers"·​target="_top">FreeBSD​·​technical·​discussions·​郵遞論壇</​a>,136 »       ​請注意:不要只把·​diff·​檔發到·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​hackers"·​target="_top">FreeBSD​·​technical·​discussions·​郵遞論壇</​a>,
137 »       ​否則它們可能會被遺忘!·​我們會非常感激您提交的修改137 »       ​否則它們可能會被遺忘!·​我們會非常感激您提交的修改
138 »       ​(這是一個義工計劃!)​;·​因為我們都很忙,138 »       ​(這是一個義工計劃!)​;·​因為我們都很忙,
139 »       ​因此有時不一定能夠立即修正問題,但·​PR·​資料庫將一直保持著這些記錄,139 »       ​因此有時不一定能夠立即修正問題,但·​PR·​資料庫將一直保持著這些記錄,
140 »       ​因此只要有人有了時間它們就能被改正了。140 »       ​因此只要有人有了時間它們就能被改正了。
141 »       ​如果您的問題報告中包括·​patch·​,不要忘了在標題加上141 »       ​如果您的問題報告中包括·​patch·​,不要忘了在標題加上
142 »       ​<code·​class="literal">[PATC​H]</​code>·​來強調一下。</​p><a·​id="idp59478840"·​class="indexterm"></​a><p>如果您認為合適·​(例如增、刪檔案或更改檔名)​,142 »       ​<code·​class="literal">[PATC​H]</​code>·​來強調一下。</​p><a·​id="idp59432376"·​class="indexterm"></​a><p>如果您認為合適·​(例如增、刪檔案或更改檔名)​,
143 »       ​還可以考慮使用143 »       ​還可以考慮使用
144 »       ​<code·​class="command">tar</​code>·​來將檔案打包,然後用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=uuencode&am​p;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>uuencode</​span>(1)​</​span></​a>144 »       ​<code·​class="command">tar</​code>·​來將檔案打包,然後用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=uuencode&am​p;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>uuencode</​span>(1)​</​span></​a>
145 »       ​來編碼。此外,也可以用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=shar&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>shar</​span>(1)​</​span></​a>·​產生的方式。</​p><p>如果您的修改可能存在潛在的爭議,​例如,145 »       ​來編碼。此外,也可以用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=shar&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>shar</​span>(1)​</​span></​a>·​產生的方式。</​p><p>如果您的修改可能存在潛在的爭議,​例如,
146 »       ​您不確定相關的版權問題,或者感覺需要經過更​嚴格的復審才可以發佈它們,146 »       ​您不確定相關的版權問題,或者感覺需要經過更​嚴格的復審才可以發佈它們,
147 »       ​則應直接發給·​Core·​Team·​<code·​class="email">&lt;​<a·​xmlns=""·​class="email"·​href="mailto:​core@FreeBSD.​org">core@FreeBSD.​org</​a>&gt;​</​code>,而不是透過·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​來發送。147 »       ​則應直接發給·​Core·​Team·​<code·​class="email">&lt;​<a·​xmlns=""·​class="email"·​href="mailto:​core@FreeBSD.​org">core@FreeBSD.​org</​a>&gt;​</​code>,而不是透過·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​來發送。
148 »       ​Core·​Team·​<code·​class="email">&lt;​<a·​xmlns=""·​class="email"·​href="mailto:​core@FreeBSD.​org">core@FreeBSD.​org</​a>&gt;​</​code>·​這小組成員大多從事·​FreeBSD·​的日常工作。148 »       ​Core·​Team·​<code·​class="email">&lt;​<a·​xmlns=""·​class="email"·​href="mailto:​core@FreeBSD.​org">core@FreeBSD.​org</​a>&gt;​</​code>·​這小組成員大多從事·​FreeBSD·​的日常工作。
149 »       ​需要注意的是,這個小組也因此十分忙碌,149 »       ​需要注意的是,這個小組也因此十分忙碌,
150 »       ​因此只有在非常必要的時候,才應寫信給他們。​</​p><p>請參考·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=intro&amp;​sektion=9&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>intro</​span>(9)​</​span></​a>·​和·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=style&amp;​sektion=9&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>style</​span>(9)​</​span></​a>·​以了解關於撰寫程式碼的風格偏好。150 »       ​因此只有在非常必要的時候,才應寫信給他們。​</​p><p>請參考·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=intro&amp;​sektion=9&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>intro</​span>(9)​</​span></​a>·​和·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=style&amp;​sektion=9&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>style</​span>(9)​</​span></​a>·​以了解關於撰寫程式碼的風格偏好。
151 »       ​若能在送出相關程式碼之前,先了解這些,那對​大家來說將是極大的幫助。</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59500472"></​a>2.​4.​·​新原始碼或重要的加值軟體包</​h3></​div></​div></​div><p>如果您打算提供規模較大的原始​碼,或者為·​FreeBSD·​增加重要的新功能,151 »       ​若能在送出相關程式碼之前,先了解這些,那對​大家來說將是極大的幫助。</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59453880"></​a>2.​4.​·​新原始碼或重要的加值軟體包</​h3></​div></​div></​div><p>如果您打算提供規模較大的原始​碼,或者為·​FreeBSD·​增加重要的新功能,
152 »       ​則可能必須將它們透過·​uuencode·​進行編碼,或傳到某個·​Web·​或152 »       ​則可能必須將它們透過·​uuencode·​進行編碼,或傳到某個·​Web·​或
153 »       ​FTP·​站點,以便更多的人能夠得到它。如果您沒有這​樣的主機,153 »       ​FTP·​站點,以便更多的人能夠得到它。如果您沒有這​樣的主機,
154 »       ​請到相關的·​FreeBSD·​郵遞論壇提出,看看是否有人願意幫您放置它們​。</​p><p>對於大量的原始碼而言,關於版權的​問題肯定會被提出。154 »       ​請到相關的·​FreeBSD·​郵遞論壇提出,看看是否有人願意幫您放置它們​。</​p><p>對於大量的原始碼而言,關於版權的​問題肯定會被提出。
155 »       ​FreeBSD·​基本系統中能夠使用的版權聲明包括:</​p><div·​class="orderedlist"><​ol·​class="orderedlist"·​type="1"><li·​class="listitem"><p>B​SD<a·​id="idp59510200"·​class="indexterm"></​a>·​版權。我們傾向於使用這類授權的原始碼,155 »       ​FreeBSD·​基本系統中能夠使用的版權聲明包括:</​p><div·​class="orderedlist"><​ol·​class="orderedlist"·​type="1"><li·​class="listitem"><p>B​SD<a·​id="idp59462712"·​class="indexterm"></​a>·​版權。我們傾向於使用這類授權的原始碼,
156 »       ​····​因為它『不附加多餘的條件』,因而更能夠吸引​商業企業使用。156 »       ​····​因為它『不附加多餘的條件』,因而更能夠吸引​商業企業使用。
157 »       ​····​FreeBSD·​並不反對商業公司使用它的原始碼,相反,157 »       ​····​FreeBSD·​並不反對商業公司使用它的原始碼,相反,
158 »       ​····​我們積極地鼓勵商業公司使用我們的原始碼,158 »       ​····​我們積極地鼓勵商業公司使用我們的原始碼,
159 »       ​····​當然,如果它們若最終能把部分原始碼,重新捐​贈給·​FreeBSD·​就更好了。</​p></​li><li·​class="listitem"><p>G​NU·​General·​Public·​License,或簡稱·​<span·​class="quote">“<span·​class="quote">GPL</​span>”</​span>。<a·​id="idp59513400"·​class="indexterm"></​a><a·​id="idp59515704"·​class="indexterm"></​a>159 »       ​····​當然,如果它們若最終能把部分原始碼,重新捐​贈給·​FreeBSD·​就更好了。</​p></​li><li·​class="listitem"><p>G​NU·​General·​Public·​License,或簡稱·​<span·​class="quote">“<span·​class="quote">GPL</​span>”</​span>。<a·​id="idp59467320"·​class="indexterm"></​a><a·​id="idp59482168"·​class="indexterm"></​a>
160 »       ​····​我們並不很歡迎使用這樣授權的原始碼,160 »       ​····​我們並不很歡迎使用這樣授權的原始碼,
161 »       ​····​因為商業公司使用它需要做更多的工作。不過,​由於很多使用161 »       ​····​因為商業公司使用它需要做更多的工作。不過,​由於很多使用
162 »       ​····​GPL·​授權的原始碼目前是無法避免的·​(compiler,​·​assembler,​·​text·​formatter等等)​162 »       ​····​GPL·​授權的原始碼目前是無法避免的·​(compiler,​·​assembler,​·​text·​formatter等等)​
163 »       ​····​,拒絕使用所有採用這樣授權的軟體是很不明智​的。163 »       ​····​,拒絕使用所有採用這樣授權的軟體是很不明智​的。
164 »       ​····​採用·​GPL·​授權的原始碼會被放到原始碼的一些特定的位置​,例如164 »       ​····​採用·​GPL·​授權的原始碼會被放到原始碼的一些特定的位置​,例如
165 »       ​····​<code·​class="filename">/​sys/​gnu</​code>·​或165 »       ​····​<code·​class="filename">/​sys/​gnu</​code>·​或
166 »       ​····​<code·​class="filename">/​usr/​src/​gnu</​code>,以便那些認為·​GPL166 »       ​····​<code·​class="filename">/​usr/​src/​gnu</​code>,以便那些認為·​GPL
Offset 191, 15 lines modifiedOffset 191, 15 lines modified
191 DATA,​·​OR·​PROFITS;​·​OR·​BUSINESS·​INTERRUPTION)​·​HOWEVER·​CAUSED·​AND·​ON·​ANY191 DATA,​·​OR·​PROFITS;​·​OR·​BUSINESS·​INTERRUPTION)​·​HOWEVER·​CAUSED·​AND·​ON·​ANY
192 THEORY·​OF·​LIABILITY,​·​WHETHER·​IN·​CONTRACT,​·​STRICT·​LIABILITY,​·​OR·​TORT192 THEORY·​OF·​LIABILITY,​·​WHETHER·​IN·​CONTRACT,​·​STRICT·​LIABILITY,​·​OR·​TORT
193 (INCLUDING·​NEGLIGENCE·​OR·​OTHERWISE)​·​ARISING·​IN·​ANY·​WAY·​OUT·​OF·​THE·​USE·​OF193 (INCLUDING·​NEGLIGENCE·​OR·​OTHERWISE)​·​ARISING·​IN·​ANY·​WAY·​OUT·​OF·​THE·​USE·​OF
194 THIS·​SOFTWARE,​·​EVEN·​IF·​ADVISED·​OF·​THE·​POSSIBILITY·​OF·​SUCH·​DAMAGE.​194 THIS·​SOFTWARE,​·​EVEN·​IF·​ADVISED·​OF·​THE·​POSSIBILITY·​OF·​SUCH·​DAMAGE.​
  
195 ········​$Id$</​pre><p>為了方便您的使用,在195 ········​$Id$</​pre><p>為了方便您的使用,在
196 »       ​<code·​class="filename">/​usr/​share/​examples/​etc/​bsd-​style-​copyright</​code>196 »       ​<code·​class="filename">/​usr/​share/​examples/​etc/​bsd-​style-​copyright</​code>
197 »       ​也可以找到此授權的副本。</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59541432"></​a>2.​5.​·​贊助資金、硬體或·​Internet·​mirror</​h3></​div></​div></​div><p>我們非常願意接受各種形式的捐​贈,以進一步拓展·​FreeBSD·​計劃197 »       ​也可以找到此授權的副本。</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59494584"></​a>2.​5.​·​贊助資金、硬體或·​Internet·​mirror</​h3></​div></​div></​div><p>我們非常願意接受各種形式的捐​贈,以進一步拓展·​FreeBSD·​計劃
198 »       ​,因為有您的支持,像我們這樣的義工努力才能​夠有更大的成就!198 »       ​,因為有您的支持,像我們這樣的義工努力才能​夠有更大的成就!
199 »       ​捐贈硬體也非常重要,因為這樣能夠幫助我們增​加可支援的硬體種類,199 »       ​捐贈硬體也非常重要,因為這樣能夠幫助我們增​加可支援的硬體種類,
200 »       ​而我們中的很多人並沒有足夠的資金來購置這些​硬體。</​p><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="donations"></​a>2.​5.​1.​·​捐款</​h4></​div></​div></​div><p>FreeBSD·​基金會是一個非營利的、有課稅豁免權的基金會​,200 »       ​而我們中的很多人並沒有足夠的資金來購置這些​硬體。</​p><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="donations"></​a>2.​5.​1.​·​捐款</​h4></​div></​div></​div><p>FreeBSD·​基金會是一個非營利的、有課稅豁免權的基金會​,
201 »       ​··​之所以會建立這個基金會,是為了讓·​FreeBSD·​計劃能夠可長可久。201 »       ​··​之所以會建立這個基金會,是為了讓·​FreeBSD·​計劃能夠可長可久。
202 »       ​··​因為該基金會屬·​501(c)​3·​實體,一般而言捐款給基金會的話,可以免繳美​國聯邦收入稅,202 »       ​··​因為該基金會屬·​501(c)​3·​實體,一般而言捐款給基金會的話,可以免繳美​國聯邦收入稅,
203 »       ​··​以及科羅拉多州收入稅。通常對於有課稅豁免權​的實體進行捐贈的話,203 »       ​··​以及科羅拉多州收入稅。通常對於有課稅豁免權​的實體進行捐贈的話,
204 »       ​··​可以折抵聯邦收入中應課稅部分的金額。</​p><p>您可以把支票寄往:204 »       ​··​可以折抵聯邦收入中應課稅部分的金額。</​p><p>您可以把支票寄往:
Offset 209, 12 lines modifiedOffset 209, 12 lines modified
209 »       ​    <span·​class="city">Boulder<​/​span>,​ <span·​class="state">CO</​span> <span·​class="postcode">8030​3</​span><br·​/​>209 »       ​    <span·​class="city">Boulder<​/​span>,​ <span·​class="state">CO</​span> <span·​class="postcode">8030​3</​span><br·​/​>
210 »       ​    <span·​class="country">USA</​span><br·​/​>210 »       ​    <span·​class="country">USA</​span><br·​/​>
211 »       ​  </​p></​div><p>211 »       ​  </​p></​div><p>
212 »       ​</​p><p>FreeBSD·​基金會現在可以透過·​PayPal·​從網上接受捐款。212 »       ​</​p><p>FreeBSD·​基金會現在可以透過·​PayPal·​從網上接受捐款。
213 »       ​··​如果您想向基金會捐款,請參閱·​<a·​class="link"·​href="http:​/​/​www.​freebsdfoundation.​org"·​target="_top">FreeBSD​·​基金會</​a>·​網站。</​p><p>關於·​FreeBSD·​基金會的更多詳情,可以在·​<a·​class="link"·​href="http:​/​/​people.​FreeBSD.​org/​~jdp/​foundation/​announcement.​html"·​target="_top">FreeBSD​213 »       ​··​如果您想向基金會捐款,請參閱·​<a·​class="link"·​href="http:​/​/​www.​freebsdfoundation.​org"·​target="_top">FreeBSD​·​基金會</​a>·​網站。</​p><p>關於·​FreeBSD·​基金會的更多詳情,可以在·​<a·​class="link"·​href="http:​/​/​people.​FreeBSD.​org/​~jdp/​foundation/​announcement.​html"·​target="_top">FreeBSD​
214 »       ​··​基金會·​-​-​·​介紹</​a>·​找到。要聯絡基金會,214 »       ​··​基金會·​-​-​·​介紹</​a>·​找到。要聯絡基金會,
215 »       ​··​請發送電子郵件到215 »       ​··​請發送電子郵件到
216 »       ​··​<code·​class="email">&lt;​<a·​xmlns=""·​class="email"·​href="mailto:​bod@FreeBSDFoundation​.​org">bod@FreeBSDFound​ation.​org</​a>&gt;​</​code>。</​p></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59568312"></​a>2.​5.​2.​·​捐贈硬體</​h4></​div></​div></​div><a·​id="idp59570872"·​class="indexterm"></​a><p>FreeBSD·​計劃歡迎任何人捐贈可以使用的硬體。216 »       ​··​<code·​class="email">&lt;​<a·​xmlns=""·​class="email"·​href="mailto:​bod@FreeBSDFoundation​.​org">bod@FreeBSDFound​ation.​org</​a>&gt;​</​code>。</​p></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59535544"></​a>2.​5.​2.​·​捐贈硬體</​h4></​div></​div></​div><a·​id="idp59538104"·​class="indexterm"></​a><p>FreeBSD·​計劃歡迎任何人捐贈可以使用的硬體。
217 »       ​··​如果您有興趣捐贈硬體,請聯繫·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​donations/​"·​target="_top">捐贈聯絡人辦公​室</​a>。</​p></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59588408"></​a>2.​5.​3.​·​成為·​FreeBSD·​mirror·​的網站</​h4></​div></​div></​div><p>我們歡迎新的·​FTP、WWW·​或217 »       ​··​如果您有興趣捐贈硬體,請聯繫·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​donations/​"·​target="_top">捐贈聯絡人辦公​室</​a>。</​p></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59541560"></​a>2.​5.​3.​·​成為·​FreeBSD·​mirror·​的網站</​h4></​div></​div></​div><p>我們歡迎新的·​FTP、WWW·​或
218 »       ​··​<code·​class="command">cvsup​</​code>·​mirror·​站。如果您希望成為這樣的·​mirror·​站,218 »       ​··​<code·​class="command">cvsup​</​code>·​mirror·​站。如果您希望成為這樣的·​mirror·​站,
219 »       ​··​請參閱·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​hubs/​index.​html"·​target="_top">如何架設·​FreeBSD·​mirror</​a>219 »       ​··​請參閱·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​hubs/​index.​html"·​target="_top">如何架設·​FreeBSD·​mirror</​a>
220 »       ​··​一文,以了解進一步的情況。</​p></​div></​div></​div><div·​class="index"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59594168"></​a>索引</​h2></​div></​div></​div><div·​class="index"><div·​class="indexdiv"><h3>​符號</​h3><dl><dt>問題報告資料庫,​·​<a·​class="indexterm"·​href="#idp59339576">查​閱整個·​PR·​資料庫</​a></​dt><dt>捐贈,​·​<a·​class="indexterm"·​href="#idp59568312">捐​贈硬體</​a></​dt><dt>提交文件,​·​<a·​class="indexterm"·​href="#idp59400888">對​於文件的修訂</​a></​dt><dt>貢獻,​·​<a·​class="indexterm"·​href="#idp60856760">幫​助·​FreeBSD</​a></​dt></​dl></​div><div·​class="indexdiv"><h3>​B</​h3><dl><dt>BSD·​版權聲明,​·​<a·​class="indexterm"·​href="#idp59500472">新​原始碼或重要的加值軟體包</​a></​dt></​dl></​div><div·​class="indexdiv"><h3>​D</​h3><dl><dt>diff,​·​<a·​class="indexterm"·​href="#idp59411896">對​於現有原始碼的修改</​a></​dt></​dl></​div><div·​class="indexdiv"><h3>​F</​h3><dl><dt>FreeBSD-​CURRENT,​·​<a·​class="indexterm"·​href="#idp59411896">對​於現有原始碼的修改</​a></​dt></​dl></​div><div·​class="indexdiv"><h3>​G</​h3><dl><dt>GNU·​General·​Public·​License,​·​<a·​class="indexterm"·​href="#idp59500472">新​原始碼或·​✂220 »       ​··​一文,以了解進一步的情況。</​p></​div></​div></​div><div·​class="index"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59547448"></​a>索引</​h2></​div></​div></​div><div·​class="index"><div·​class="indexdiv"><h3>​符號</​h3><dl><dt>問題報告資料庫,​·​<a·​class="indexterm"·​href="#idp59179320">查​閱整個·​PR·​資料庫</​a></​dt><dt>捐贈,​·​<a·​class="indexterm"·​href="#idp59535544">捐​贈硬體</​a></​dt><dt>提交文件,​·​<a·​class="indexterm"·​href="#idp59350328">對​於文件的修訂</​a></​dt><dt>貢獻,​·​<a·​class="indexterm"·​href="#idp60815800">幫​助·​FreeBSD</​a></​dt></​dl></​div><div·​class="indexdiv"><h3>​B</​h3><dl><dt>BSD·​版權聲明,​·​<a·​class="indexterm"·​href="#idp59453880">新​原始碼或重要的加值軟體包</​a></​dt></​dl></​div><div·​class="indexdiv"><h3>​D</​h3><dl><dt>diff,​·​<a·​class="indexterm"·​href="#idp59362744">對​於現有原始碼的修改</​a></​dt></​dl></​div><div·​class="indexdiv"><h3>​F</​h3><dl><dt>FreeBSD-​CURRENT,​·​<a·​class="indexterm"·​href="#idp59362744">對​於現有原始碼的修改</​a></​dt></​dl></​div><div·​class="indexdiv"><h3>​G</​h3><dl><dt>GNU·​General·​Public·​License,​·​<a·​class="indexterm"·​href="#idp59453880">新​原始碼或·​✂
/usr/local/share/doc/freebsd/zh_TW.UTF-8/articles/freebsd-questions/article.html
Offset 1, 9 lines modifiedOffset 1, 9 lines modified
1 <?xml·​version="1.​0"·​encoding="utf-​8"?>1 <?xml·​version="1.​0"·​encoding="utf-​8"?>
2 <!DOCTYPE·​html·​PUBLIC·​"-​/​/​W3C/​/​DTD·​XHTML·​1.​0·​Transitional/​/​EN"·​"http:​/​/​www.​w3.​org/​TR/​xhtml1/​DTD/​xhtml1-​transitional.​dtd"><html·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"><head><meta·​http-​equiv="Content-​Type"·​content="text/​html;​·​charset=utf-​8"·​/​><title>如何在·​FreeBSD-​questions·​mailing·​list·​上得到正解</​title><link·​rel="stylesheet"·​type="text/​css"·​href="docbook.​css"·​/​><link·​rev="made"·​href="mailto:​doc@FreeBSD.​org"·​/​><meta·​name="generator"·​content="DocBook·​XSL·​Stylesheets·​V1.​78.​1"·​/​><meta·​name="description"·​content="本文主要是給準備寫信到·​FreeBSD-​questions·​mailing·​list·​的人提供一些參考。·​我們會給你一些發問的技巧與建議,以便讓你的​答案得到更有用的答覆。·​本文會定期發到·​FreeBSD-​questions·​mailing·​list·​上。"·​/​><script·​xmlns=""·​type="text/​javascript"·​src="/​layout/​js/​google.​js"></​script></​head><body><div·​xml:​lang="zh_tw"·​class="article"·​lang="zh_tw"><div·​xmlns=""·​class="titlepage"><di​v><div><h1·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60840888"></​a>如何在·​FreeBSD-​questions·​mailing·​list·​上得到正解</​h1></​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><h3·​class="auth·​✂2 <!DOCTYPE·​html·​PUBLIC·​"-​/​/​W3C/​/​DTD·​XHTML·​1.​0·​Transitional/​/​EN"·​"http:​/​/​www.​w3.​org/​TR/​xhtml1/​DTD/​xhtml1-​transitional.​dtd"><html·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"><head><meta·​http-​equiv="Content-​Type"·​content="text/​html;​·​charset=utf-​8"·​/​><title>如何在·​FreeBSD-​questions·​mailing·​list·​上得到正解</​title><link·​rel="stylesheet"·​type="text/​css"·​href="docbook.​css"·​/​><link·​rev="made"·​href="mailto:​doc@FreeBSD.​org"·​/​><meta·​name="generator"·​content="DocBook·​XSL·​Stylesheets·​V1.​78.​1"·​/​><meta·​name="description"·​content="本文主要是給準備寫信到·​FreeBSD-​questions·​mailing·​list·​的人提供一些參考。·​我們會給你一些發問的技巧與建議,以便讓你的​答案得到更有用的答覆。·​本文會定期發到·​FreeBSD-​questions·​mailing·​list·​上。"·​/​><script·​xmlns=""·​type="text/​javascript"·​src="/​layout/​js/​google.​js"></​script></​head><body><div·​xml:​lang="zh_tw"·​class="article"·​lang="zh_tw"><div·​xmlns=""·​class="titlepage"><di​v><div><h1·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60812216"></​a>如何在·​FreeBSD-​questions·​mailing·​list·​上得到正解</​h1></​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><h3·​class="auth·​✂
3 ··​Outlook,​·​Windows,​·​Windows·​Media,​·​和·​Windows·​NT·​是·​Microsoft·​Corporation3 ··​Outlook,​·​Windows,​·​Windows·​Media,​·​和·​Windows·​NT·​是·​Microsoft·​Corporation
4 ··​在美國和/​或其他國家的商標或註冊商標。</​p><p>Netscape·​以及·​Netscape Navigator4 ··​在美國和/​或其他國家的商標或註冊商標。</​p><p>Netscape·​以及·​Netscape Navigator
5 ··​是·​Netscape·​Communications·​Corporation·​在美國和其他國家的註冊商標。</​p><p>Motif,​·​OSF/​1,​·​和·​UNIX5 ··​是·​Netscape·​Communications·​Corporation·​在美國和其他國家的註冊商標。</​p><p>Motif,​·​OSF/​1,​·​和·​UNIX
6 ··​是·​The·​Open·​Group·​在美國和其他國家的註冊商標;·​IT·​DialTone·​和·​The·​Open·​Group6 ··​是·​The·​Open·​Group·​在美國和其他國家的註冊商標;·​IT·​DialTone·​和·​The·​Open·​Group
7 ··​是其商標。</​p><p>QUALCOMM·​和·​Eudora·​是·​QUALCOMM·​Incorporated7 ··​是其商標。</​p><p>QUALCOMM·​和·​Eudora·​是·​QUALCOMM·​Incorporated
8 ··​的註冊商標。</​p><p>許多製造商和經銷商使用一些稱為商​標的圖案或文字設計來彰顯自己的產品。8 ··​的註冊商標。</​p><p>許多製造商和經銷商使用一些稱為商​標的圖案或文字設計來彰顯自己的產品。
9 ··​本文中出現的眾多商標,以及·​FreeBSD·​Project·​本身廣所人知的商標,後面將以·​'™'·​或·​'®'·​符號來標註。</​p></​div></​div><div>··​2014-​05-​29·​由·​lwhsu.​</​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="abstract"><div​·​class="abstract-​title">摘要</​div><p>本文主要是給準備寫信到·​FreeBSD-​questions·​mailing·​list·​的人提供一些參考。9 ··​本文中出現的眾多商標,以及·​FreeBSD·​Project·​本身廣所人知的商標,後面將以·​'™'·​或·​'®'·​符號來標註。</​p></​div></​div><div>··​2014-​05-​29·​由·​lwhsu.​</​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="abstract"><div​·​class="abstract-​title">摘要</​div><p>本文主要是給準備寫信到·​FreeBSD-​questions·​mailing·​list·​的人提供一些參考。
Offset 11, 16 lines modifiedOffset 11, 16 lines modified
11 ······​[11 ······​[
12 ······​<a·​href="index.​html">章節模式</​a>12 ······​<a·​href="index.​html">章節模式</​a>
13 ······​/​13 ······​/​
14 ······14 ······
15 »       ​··​完整模式15 »       ​··​完整模式
16 »       ​16 »       ​
17 ······​]17 ······​]
18 ····​</​div><hr·​/​></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="sect1"><a·​href="#idp58128184">1​.​·​簡介</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#idp58246712">2​.​·​How·​to·​subscribe·​to·​FreeBSD-​questions</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#idp58285880">3​.​·​How·​to·​unsubscribe·​from·​FreeBSD-​questions</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#idp59022520">4​.​·​Should·​I·​ask·​<code·​class="literal">-​questions</​code>·​or18 ····​</​div><hr·​/​></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="sect1"><a·​href="#idp58156344">1​.​·​簡介</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#idp58176312">2​.​·​How·​to·​subscribe·​to·​FreeBSD-​questions</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#idp58281912">3​.​·​How·​to·​unsubscribe·​from·​FreeBSD-​questions</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#idp58432312">4​.​·​Should·​I·​ask·​<code·​class="literal">-​questions</​code>·​or
19 ······​<code·​class="literal">-​hackers</​code>?</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#idp59343032">5​.​·​Before·​submitting·​a·​question</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#idp59386680">6​.​·​How·​to·​submit·​a·​question</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#idp59520312">7​.​·​How·​to·​follow·​up·​to·​a·​question</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#idp59534648">8​.​·​How·​to·​answer·​a·​question</​a></​span></​dt></​dl></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="idp58128184"></​a>1.​·​簡介</​h2></​div></​div></​div><p><code·​class="literal">FreeB​SD-​questions</​code>·​is·​a·​mailing·​list·​maintained·​by19 ······​<code·​class="literal">-​hackers</​code>?</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#idp59063352">5​.​·​Before·​submitting·​a·​question</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#idp59332280">6​.​·​How·​to·​submit·​a·​question</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#idp59457592">7​.​·​How·​to·​follow·​up·​to·​a·​question</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#idp59476024">8​.​·​How·​to·​answer·​a·​question</​a></​span></​dt></​dl></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="idp58156344"></​a>1.​·​簡介</​h2></​div></​div></​div><p><code·​class="literal">FreeB​SD-​questions</​code>·​is·​a·​mailing·​list·​maintained·​by
20 ······​the·​FreeBSD·​project·​to·​help·​people·​who·​have·​questions·​about·​the·​normal20 ······​the·​FreeBSD·​project·​to·​help·​people·​who·​have·​questions·​about·​the·​normal
21 ······​use·​of·​FreeBSD.​··​Another·​group,​·​<code·​class="literal">FreeB​SD-​hackers</​code>,​21 ······​use·​of·​FreeBSD.​··​Another·​group,​·​<code·​class="literal">FreeB​SD-​hackers</​code>,​
22 ······​discusses·​more·​advanced·​questions·​such·​as·​future·​development22 ······​discusses·​more·​advanced·​questions·​such·​as·​future·​development
23 ······​work.​</​p><div·​xmlns=""·​class="note"><h3·​class="admontitle">注意​:​·​</​h3><p·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml">The·​term·​<span·​class="quote">“<span·​class="quote">hacker<​/​span>”</​span>·​has·​nothing·​to·​do·​with·​breaking23 ······​work.​</​p><div·​xmlns=""·​class="note"><h3·​class="admontitle">注意​:​·​</​h3><p·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml">The·​term·​<span·​class="quote">“<span·​class="quote">hacker<​/​span>”</​span>·​has·​nothing·​to·​do·​with·​breaking
24 »       ​into·​other·​people's·​computers.​··​The·​correct·​term·​for·​the·​latter24 »       ​into·​other·​people's·​computers.​··​The·​correct·​term·​for·​the·​latter
25 »       ​activity·​is·​<span·​class="quote">“<span·​class="quote">cracker​</​span>”</​span>,​·​but·​the·​popular·​press·​has·​not·​found25 »       ​activity·​is·​<span·​class="quote">“<span·​class="quote">cracker​</​span>”</​span>,​·​but·​the·​popular·​press·​has·​not·​found
26 »       ​out·​yet.​··​The·​FreeBSD·​hackers·​disapprove·​strongly·​of·​cracking26 »       ​out·​yet.​··​The·​FreeBSD·​hackers·​disapprove·​strongly·​of·​cracking
Offset 33, 28 lines modifiedOffset 33, 28 lines modified
33 ······​arrogant,​·​stuck-​up,​·​and·​unhelpful,​·​while·​the·​hackers·​accuse·​the33 ······​arrogant,​·​stuck-​up,​·​and·​unhelpful,​·​while·​the·​hackers·​accuse·​the
34 ······​newcomers·​of·​being·​stupid,​·​unable·​to·​read·​plain·​English,​·​and·​expecting34 ······​newcomers·​of·​being·​stupid,​·​unable·​to·​read·​plain·​English,​·​and·​expecting
35 ······​everything·​to·​be·​handed·​to·​them·​on·​a·​silver·​platter.​··​Of·​course,​·​there·​is35 ······​everything·​to·​be·​handed·​to·​them·​on·​a·​silver·​platter.​··​Of·​course,​·​there·​is
36 ······​an·​element·​of·​truth·​in·​both·​these·​claims,​·​but·​for·​the·​most·​part·​these36 ······​an·​element·​of·​truth·​in·​both·​these·​claims,​·​but·​for·​the·​most·​part·​these
37 ······​viewpoints·​come·​from·​a·​sense·​of·​frustration.​</​p><p>In·​this·​document,​·​I·​would·​like·​to·​do·​something·​to·​relieve·​this37 ······​viewpoints·​come·​from·​a·​sense·​of·​frustration.​</​p><p>In·​this·​document,​·​I·​would·​like·​to·​do·​something·​to·​relieve·​this
38 ······​frustration·​and·​help·​everybody·​get·​better·​results·​from38 ······​frustration·​and·​help·​everybody·​get·​better·​results·​from
39 ······​FreeBSD-​questions.​··​In·​the·​following·​section,​·​I·​recommend·​how·​to·​submit39 ······​FreeBSD-​questions.​··​In·​the·​following·​section,​·​I·​recommend·​how·​to·​submit
40 ······​a·​question;​·​after·​that,​·​we·​will·​look·​at·​how·​to·​answer·​one.​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="idp58246712"></​a>2.​·​How·​to·​subscribe·​to·​FreeBSD-​questions</​h2></​div></​div></​div><p>FreeBSD-​questions·​is·​a·​mailing·​list,​·​so·​you·​need·​mail·​access.​··​Point40 ······​a·​question;​·​after·​that,​·​we·​will·​look·​at·​how·​to·​answer·​one.​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="idp58176312"></​a>2.​·​How·​to·​subscribe·​to·​FreeBSD-​questions</​h2></​div></​div></​div><p>FreeBSD-​questions·​is·​a·​mailing·​list,​·​so·​you·​need·​mail·​access.​··​Point
41 ······​your·​WWW·​browser·​to·​the·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​questions"·​target="_top">informa​tion·​page·​of·​the·​FreeBSD-​questions·​mailing·​list</​a>.​41 ······​your·​WWW·​browser·​to·​the·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​questions"·​target="_top">informa​tion·​page·​of·​the·​FreeBSD-​questions·​mailing·​list</​a>.​
42 ······​In·​the·​section·​titled·​<span·​class="quote">“<span·​class="quote">Subscri​bing·​to·​freebsd-​questions</​span>”</​span>·​fill42 ······​In·​the·​section·​titled·​<span·​class="quote">“<span·​class="quote">Subscri​bing·​to·​freebsd-​questions</​span>”</​span>·​fill
43 ······​in·​the·​<span·​class="quote">“<span·​class="quote">Your·​email·​address</​span>”</​span>·​field;​·​the·​other·​fields·​are·​optional.​43 ······​in·​the·​<span·​class="quote">“<span·​class="quote">Your·​email·​address</​span>”</​span>·​field;​·​the·​other·​fields·​are·​optional.​
44 ····​</​p><div·​xmlns=""·​class="note"><h3·​class="admontitle">注意​:​·​</​h3><p·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml">The·​password·​fields·​in·​the·​subscription·​form·​provide·​only·​mild44 ····​</​p><div·​xmlns=""·​class="note"><h3·​class="admontitle">注意​:​·​</​h3><p·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml">The·​password·​fields·​in·​the·​subscription·​form·​provide·​only·​mild
45 ········​security,​·​but·​should·​prevent·​others·​from·​messing·​with·​your45 ········​security,​·​but·​should·​prevent·​others·​from·​messing·​with·​your
46 ········​subscription.​··​<span·​class="emphasis"><em>​Do·​not·​use·​a·​valuable·​password</​em></​span>·​as46 ········​subscription.​··​<span·​class="emphasis"><em>​Do·​not·​use·​a·​valuable·​password</​em></​span>·​as
47 ········​it·​will·​occasionally·​be·​emailed·​back·​to·​you·​in·​cleartext.​</​p></​div><p>You·​will·​receive·​a·​confirmation·​message·​from47 ········​it·​will·​occasionally·​be·​emailed·​back·​to·​you·​in·​cleartext.​</​p></​div><p>You·​will·​receive·​a·​confirmation·​message·​from
48 ······​<span·​class="application">m​ailman</​span>;​·​follow·​the·​included·​instructions48 ······​<span·​class="application">m​ailman</​span>;​·​follow·​the·​included·​instructions
49 ······​to·​complete·​your·​subscription.​</​p><p>Finally,​·​when·​you·​get·​the·​<span·​class="quote">“<span·​class="quote">Welcome​</​span>”</​span>·​message·​from49 ······​to·​complete·​your·​subscription.​</​p><p>Finally,​·​when·​you·​get·​the·​<span·​class="quote">“<span·​class="quote">Welcome​</​span>”</​span>·​message·​from
50 ······​<span·​class="application">m​ailman</​span>·​telling·​you·​the·​details·​of·​the·​list50 ······​<span·​class="application">m​ailman</​span>·​telling·​you·​the·​details·​of·​the·​list
51 ······​and·​subscription·​area·​password,​·​<span·​class="emphasis"><em>​please·​save·​it</​em></​span>.​51 ······​and·​subscription·​area·​password,​·​<span·​class="emphasis"><em>​please·​save·​it</​em></​span>.​
52 ······​If·​you·​ever·​should·​want·​to·​leave·​the·​list,​·​you·​will·​need·​the·​information52 ······​If·​you·​ever·​should·​want·​to·​leave·​the·​list,​·​you·​will·​need·​the·​information
53 ······​there.​··​See·​the·​next·​section·​for·​more·​details.​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="idp58285880"></​a>3.​·​How·​to·​unsubscribe·​from·​FreeBSD-​questions</​h2></​div></​div></​div><p>When·​you·​subscribed·​to·​FreeBSD-​questions,​·​you·​got·​a·​welcome·​message53 ······​there.​··​See·​the·​next·​section·​for·​more·​details.​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="idp58281912"></​a>3.​·​How·​to·​unsubscribe·​from·​FreeBSD-​questions</​h2></​div></​div></​div><p>When·​you·​subscribed·​to·​FreeBSD-​questions,​·​you·​got·​a·​welcome·​message
54 ······​from·​<span·​class="application">m​ailman</​span>.​··​In·​this·​message,​·​amongst54 ······​from·​<span·​class="application">m​ailman</​span>.​··​In·​this·​message,​·​amongst
55 ······​other·​things,​·​it·​told·​you·​how·​to·​unsubscribe.​··​Here·​is·​a·​typical55 ······​other·​things,​·​it·​told·​you·​how·​to·​unsubscribe.​··​Here·​is·​a·​typical
56 ······​message:​</​p><pre·​class="literallayout"​>Welcome·​to·​the·​freebsd-​questions@freebsd.​org·​mailing·​list!56 ······​message:​</​p><pre·​class="literallayout"​>Welcome·​to·​the·​freebsd-​questions@freebsd.​org·​mailing·​list!
  
57 To·​post·​to·​this·​list,​·​send·​your·​email·​to:​57 To·​post·​to·​this·​list,​·​send·​your·​email·​to:​
  
58 ··​freebsd-​questions@freebsd.​org58 ··​freebsd-​questions@freebsd.​org
Offset 90, 15 lines modifiedOffset 90, 15 lines modified
90 ······​to·​<span·​class="quote">“<span·​class="quote">Unsubsc​ribe</​span>”</​span>·​you·​from·​FreeBSD-​questions·​mailing90 ······​to·​<span·​class="quote">“<span·​class="quote">Unsubsc​ribe</​span>”</​span>·​you·​from·​FreeBSD-​questions·​mailing
91 ······​list.​</​p><p>A·​confirmation·​message·​will·​be·​sent·​to·​you·​from91 ······​list.​</​p><p>A·​confirmation·​message·​will·​be·​sent·​to·​you·​from
92 ······​<span·​class="application">m​ailman</​span>;​·​follow·​the·​included·​instructions92 ······​<span·​class="application">m​ailman</​span>;​·​follow·​the·​included·​instructions
93 ······​to·​finish·​unsubscribing.​</​p><p>If·​you·​have·​done·​this,​·​and·​you·​still·​can·​not·​figure·​out·​what93 ······​to·​finish·​unsubscribing.​</​p><p>If·​you·​have·​done·​this,​·​and·​you·​still·​can·​not·​figure·​out·​what
94 ······​is·​going·​on,​·​send·​a·​message·​to94 ······​is·​going·​on,​·​send·​a·​message·​to
95 ······​<code·​class="email">&lt;​<a·​xmlns=""·​class="email"·​href="mailto:​freebsd-​questions-​request@FreeBSD.​org">freebsd-​questions-​request@FreeBSD.​org</​a>&gt;​</​code>,​·​and·​they·​will95 ······​<code·​class="email">&lt;​<a·​xmlns=""·​class="email"·​href="mailto:​freebsd-​questions-​request@FreeBSD.​org">freebsd-​questions-​request@FreeBSD.​org</​a>&gt;​</​code>,​·​and·​they·​will
96 ······​sort·​things·​out·​for·​you.​··​<span·​class="emphasis"><em>​Do·​not</​em></​span>·​send·​a·​message·​to96 ······​sort·​things·​out·​for·​you.​··​<span·​class="emphasis"><em>​Do·​not</​em></​span>·​send·​a·​message·​to
97 ······​FreeBSD-​questions:​·​they·​can·​not·​help·​you.​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="idp59022520"></​a>4.​·​Should·​I·​ask·​<code·​class="literal">-​questions</​code>·​or97 ······​FreeBSD-​questions:​·​they·​can·​not·​help·​you.​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="idp58432312"></​a>4.​·​Should·​I·​ask·​<code·​class="literal">-​questions</​code>·​or
98 ······​<code·​class="literal">-​hackers</​code>?</​h2></​div></​div></​div><p>Two·​mailing·​lists·​handle·​general·​questions·​about·​FreeBSD,​98 ······​<code·​class="literal">-​hackers</​code>?</​h2></​div></​div></​div><p>Two·​mailing·​lists·​handle·​general·​questions·​about·​FreeBSD,​
99 ······​<code·​class="literal">FreeB​SD-​questions</​code>·​and99 ······​<code·​class="literal">FreeB​SD-​questions</​code>·​and
100 ······​<code·​class="literal">FreeB​SD-​hackers</​code>.​··​In·​some·​cases,​·​it·​is·​not·​really100 ······​<code·​class="literal">FreeB​SD-​hackers</​code>.​··​In·​some·​cases,​·​it·​is·​not·​really
101 ······​clear·​which·​group·​you·​should·​ask.​··​The·​following·​criteria·​should·​help101 ······​clear·​which·​group·​you·​should·​ask.​··​The·​following·​criteria·​should·​help
102 ······​for·​99%·​of·​all·​questions,​·​however:​</​p><div·​class="orderedlist"><​ol·​class="orderedlist"·​type="1"><li·​class="listitem"><p>I​f·​the·​question·​is·​of·​a·​general·​nature,​·​ask102 ······​for·​99%·​of·​all·​questions,​·​however:​</​p><div·​class="orderedlist"><​ol·​class="orderedlist"·​type="1"><li·​class="listitem"><p>I​f·​the·​question·​is·​of·​a·​general·​nature,​·​ask
103 »       ​··​<code·​class="literal">FreeB​SD-​questions</​code>.​··​Examples·​might·​be·​questions103 »       ​··​<code·​class="literal">FreeB​SD-​questions</​code>.​··​Examples·​might·​be·​questions
104 »       ​··​about·​installing·​FreeBSD·​or·​the·​use·​of·​a·​particular·​<span·​class="trademark">UNI​X</​span>®104 »       ​··​about·​installing·​FreeBSD·​or·​the·​use·​of·​a·​particular·​<span·​class="trademark">UNI​X</​span>®
Offset 112, 15 lines modifiedOffset 112, 15 lines modified
112 »       ​··​can·​make·​suggestions·​about·​how·​to·​implement·​them,​·​then·​send·​the112 »       ​··​can·​make·​suggestions·​about·​how·​to·​implement·​them,​·​then·​send·​the
113 »       ​··​message·​to·​<code·​class="literal">FreeB​SD-​hackers</​code>.​</​p></​li></​ol></​div><p>There·​are·​also·​a·​number·​of·​other·​specialized·​mailing·​lists,​·​for113 »       ​··​message·​to·​<code·​class="literal">FreeB​SD-​hackers</​code>.​</​p></​li></​ol></​div><p>There·​are·​also·​a·​number·​of·​other·​specialized·​mailing·​lists,​·​for
114 ······​example·​<code·​class="literal">FreeB​SD-​isp</​code>,​·​which·​caters·​to·​the·​interests·​of114 ······​example·​<code·​class="literal">FreeB​SD-​isp</​code>,​·​which·​caters·​to·​the·​interests·​of
115 ······​ISPs·​(Internet·​Service·​Providers)​·​who·​run·​FreeBSD.​··​If·​you·​happen·​to·​be115 ······​ISPs·​(Internet·​Service·​Providers)​·​who·​run·​FreeBSD.​··​If·​you·​happen·​to·​be
116 ······​an·​ISP,​·​this·​does·​not·​mean·​you·​should·​automatically·​send·​your·​questions116 ······​an·​ISP,​·​this·​does·​not·​mean·​you·​should·​automatically·​send·​your·​questions
117 ······​to·​<code·​class="literal">FreeB​SD-​isp</​code>.​··​The·​criteria·​above·​still·​apply,​·​and117 ······​to·​<code·​class="literal">FreeB​SD-​isp</​code>.​··​The·​criteria·​above·​still·​apply,​·​and
118 ······​it·​is·​in·​your·​interest·​to·​stick·​to·​them,​·​since·​you·​are·​more·​likely·​to·​get118 ······​it·​is·​in·​your·​interest·​to·​stick·​to·​them,​·​since·​you·​are·​more·​likely·​to·​get
119 ······​good·​results·​that·​way.​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="idp59343032"></​a>5.​·​Before·​submitting·​a·​question</​h2></​div></​div></​div><p>You·​can·​(and·​should)​·​do·​some·​things·​yourself·​before·​asking·​a·​question119 ······​good·​results·​that·​way.​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="idp59063352"></​a>5.​·​Before·​submitting·​a·​question</​h2></​div></​div></​div><p>You·​can·​(and·​should)​·​do·​some·​things·​yourself·​before·​asking·​a·​question
120 ······​on·​one·​of·​the·​mailing·​lists:​</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>T​ry·​solving·​the·​problem·​on·​your·​own.​··​If·​you·​post·​a·​question·​which120 ······​on·​one·​of·​the·​mailing·​lists:​</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>T​ry·​solving·​the·​problem·​on·​your·​own.​··​If·​you·​post·​a·​question·​which
121 »       ​··​shows·​that·​you·​have·​tried·​to·​solve·​the·​problem,​·​your·​question·​will121 »       ​··​shows·​that·​you·​have·​tried·​to·​solve·​the·​problem,​·​your·​question·​will
122 »       ​··​generally·​attract·​more·​positive·​attention·​from·​people·​reading·​it.​122 »       ​··​generally·​attract·​more·​positive·​attention·​from·​people·​reading·​it.​
123 »       ​··​Trying·​to·​solve·​the·​problem·​yourself·​will·​also·​enhance·​your·​understanding123 »       ​··​Trying·​to·​solve·​the·​problem·​yourself·​will·​also·​enhance·​your·​understanding
124 »       ​··​of·​FreeBSD,​·​and·​will·​eventually·​let·​you·​use·​your·​knowledge·​to·​help·​others124 »       ​··​of·​FreeBSD,​·​and·​will·​eventually·​let·​you·​use·​your·​knowledge·​to·​help·​others
125 »       ​··​by·​answering·​questions·​posted·​to·​the·​mailing·​lists.​125 »       ​··​by·​answering·​questions·​posted·​to·​the·​mailing·​lists.​
126 »       ​</​p></​li><li·​class="listitem"><p>R​ead·​the·​manual·​pages,​·​and·​the·​FreeBSD·​documentation·​(either126 »       ​</​p></​li><li·​class="listitem"><p>R​ead·​the·​manual·​pages,​·​and·​the·​FreeBSD·​documentation·​(either
Offset 134, 15 lines modifiedOffset 134, 15 lines modified
134 »       ​··​at·​<code·​class="uri"><a·​class="uri"·​href="http:​/​/​www.​FreeBSD.​org/​mail"·​target="_top">http:​/​/​www.​FreeBSD.​org/​mail</​a></​code>134 »       ​··​at·​<code·​class="uri"><a·​class="uri"·​href="http:​/​/​www.​FreeBSD.​org/​mail"·​target="_top">http:​/​/​www.​FreeBSD.​org/​mail</​a></​code>
135 »       ​··​and·​<code·​class="uri"><a·​class="uri"·​href="http:​/​/​www.​FreeBSD.​org/​search/​search.​html#mailinglists"·​target="_top">http:​/​/​www.​FreeBSD.​org/​search/​search.​html#mailinglists</​a></​code>135 »       ​··​and·​<code·​class="uri"><a·​class="uri"·​href="http:​/​/​www.​FreeBSD.​org/​search/​search.​html#mailinglists"·​target="_top">http:​/​/​www.​FreeBSD.​org/​search/​search.​html#mailinglists</​a></​code>
136 »       ​··​respectively.​··​This·​can·​be·​done·​at·​other·​WWW·​sites·​as·​well,​·​for·​example136 »       ​··​respectively.​··​This·​can·​be·​done·​at·​other·​WWW·​sites·​as·​well,​·​for·​example
137 »       ​··​at·​<code·​class="uri"><a·​class="uri"·​href="http:​/​/​marc.​theaimsgroup.​com"·​target="_top">http:​/​/​marc.​theaimsgroup.​com</​a></​code>.​137 »       ​··​at·​<code·​class="uri"><a·​class="uri"·​href="http:​/​/​marc.​theaimsgroup.​com"·​target="_top">http:​/​/​marc.​theaimsgroup.​com</​a></​code>.​
138 »       ​</​p></​li><li·​class="listitem"><p>U​se·​a·​search·​engine·​such·​as·​<a·​class="link"·​href="http:​/​/​www.​google.​com"·​target="_top">Google<​/​a>138 »       ​</​p></​li><li·​class="listitem"><p>U​se·​a·​search·​engine·​such·​as·​<a·​class="link"·​href="http:​/​/​www.​google.​com"·​target="_top">Google<​/​a>
139 ··········​or·​<a·​class="link"·​href="http:​/​/​www.​yahoo.​com"·​target="_top">Yahoo</​a>·​to·​find·​answers·​to·​your·​question.​139 ··········​or·​<a·​class="link"·​href="http:​/​/​www.​yahoo.​com"·​target="_top">Yahoo</​a>·​to·​find·​answers·​to·​your·​question.​
140 »       ​··​Google·​even·​has·​a·​<a·​class="link"·​href="http:​/​/​www.​google.​com/​bsd"·​target="_top">BSD-​specific·​search·​interface</​a>.​140 »       ​··​Google·​even·​has·​a·​<a·​class="link"·​href="http:​/​/​www.​google.​com/​bsd"·​target="_top">BSD-​specific·​search·​interface</​a>.​
141 ········​</​p></​li></​ul></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="idp59386680"></​a>6.​·​How·​to·​submit·​a·​question</​h2></​div></​div></​div><p>When·​submitting·​a·​question·​to·​FreeBSD-​questions,​·​consider·​the141 ········​</​p></​li></​ul></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="idp59332280"></​a>6.​·​How·​to·​submit·​a·​question</​h2></​div></​div></​div><p>When·​submitting·​a·​question·​to·​FreeBSD-​questions,​·​consider·​the
142 ······​following·​points:​</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>R​emember·​that·​nobody·​gets·​paid·​for·​answering·​a·​FreeBSD142 ······​following·​points:​</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>R​emember·​that·​nobody·​gets·​paid·​for·​answering·​a·​FreeBSD
143 »       ​··​question.​·​They·​do·​it·​of·​their·​own·​free·​will.​··​You·​can·​influence·​this143 »       ​··​question.​·​They·​do·​it·​of·​their·​own·​free·​will.​··​You·​can·​influence·​this
144 »       ​··​free·​will·​positively·​by·​submitting·​a·​well-​formulated·​question144 »       ​··​free·​will·​positively·​by·​submitting·​a·​well-​formulated·​question
145 »       ​··​supplying·​as·​much·​relevant·​information·​as·​possible.​··​You·​can145 »       ​··​supplying·​as·​much·​relevant·​information·​as·​possible.​··​You·​can
146 »       ​··​influence·​this·​free·​will·​negatively·​by·​submitting·​an·​incomplete,​146 »       ​··​influence·​this·​free·​will·​negatively·​by·​submitting·​an·​incomplete,​
147 »       ​··​illegible,​·​or·​rude·​question.​·​It·​is·​perfectly·​possible·​to·​send·​a147 »       ​··​illegible,​·​or·​rude·​question.​·​It·​is·​perfectly·​possible·​to·​send·​a
148 »       ​··​message·​to·​FreeBSD-​questions·​and·​not·​get·​an·​answer·​even·​if·​you148 »       ​··​message·​to·​FreeBSD-​questions·​and·​not·​get·​an·​answer·​even·​if·​you
Offset 218, 36 lines modifiedOffset 218, 36 lines modified
218 »       ​··​was·​offline.​··​If·​you·​do·​not·​get·​an·​answer·​after,​·​say,​·​a·​week,​·​it218 »       ​··​was·​offline.​··​If·​you·​do·​not·​get·​an·​answer·​after,​·​say,​·​a·​week,​·​it
219 »       ​··​might·​help·​to·​re-​send·​the·​message.​··​If·​you·​do·​not·​get·​an·​answer·​to219 »       ​··​might·​help·​to·​re-​send·​the·​message.​··​If·​you·​do·​not·​get·​an·​answer·​to
220 »       ​··​your·​second·​message,​·​though,​·​you·​are·​probably·​not·​going·​to·​get·​one220 »       ​··​your·​second·​message,​·​though,​·​you·​are·​probably·​not·​going·​to·​get·​one
221 »       ​··​from·​this·​forum.​··​Resending·​the·​same·​message·​again·​and·​again·​will221 »       ​··​from·​this·​forum.​··​Resending·​the·​same·​message·​again·​and·​again·​will
222 »       ​··​only·​make·​you·​unpopular.​</​p></​li></​ul></​div><p>To·​summarize,​·​let's·​assume·​you·​know·​the·​answer·​to·​the·​following222 »       ​··​only·​make·​you·​unpopular.​</​p></​li></​ul></​div><p>To·​summarize,​·​let's·​assume·​you·​know·​the·​answer·​to·​the·​following
223 ······​question·​(yes,​·​it·​is·​the·​same·​one·​in·​each·​case)​.​223 ······​question·​(yes,​·​it·​is·​the·​same·​one·​in·​each·​case)​.​
224 ······​You·​choose·​which·​of·​these·​two·​questions·​you·​would·​be·​more·​prepared·​to224 ······​You·​choose·​which·​of·​these·​two·​questions·​you·​would·​be·​more·​prepared·​to
225 ······​answer:​</​p><div·​class="example"><a·​id="idp59499704"></​a><div·​class="example-​title">範例·​1.​·​Message·​1</​div><div·​class="example-​contents"><pre·​class="literallayout"​>Subject:​·​HELP!!?!??225 ······​answer:​</​p><div·​class="example"><a·​id="idp59448760"></​a><div·​class="example-​title">範例·​1.​·​Message·​1</​div><div·​class="example-​contents"><pre·​class="literallayout"​>Subject:​·​HELP!!?!??
226 I·​just·​can't·​get·​hits·​damn·​silly·​FereBSD·​system·​to226 I·​just·​can't·​get·​hits·​damn·​silly·​FereBSD·​system·​to
227 workd,​·​and·​Im·​really·​good·​at·​this·​tsuff,​·​but·​I·​have·​never·​seen227 workd,​·​and·​Im·​really·​good·​at·​this·​tsuff,​·​but·​I·​have·​never·​seen
228 anythign·​sho·​difficult·​to·​install,​·​it·​jst·​wont·​work·​whatever·​I·​try228 anythign·​sho·​difficult·​to·​install,​·​it·​jst·​wont·​work·​whatever·​I·​try
229 so·​why·​don't·​you·​guys·​tell·​me·​what·​I·​doing·​wrong.​</​pre></​div></​div><br·​class="example-​break"·​/​><div·​class="example"><a·​id="idp59502392"></​a><div·​class="example-​title">範例·​2.​·​Message·​2</​div><div·​class="example-​contents"><pre·​class="literallayout"​>Subject:​·​Problems·​installing·​FreeBSD229 so·​why·​don't·​you·​guys·​tell·​me·​what·​I·​doing·​wrong.​</​pre></​div></​div><br·​class="example-​break"·​/​><div·​class="example"><a·​id="idp59451704"></​a><div·​class="example-​title">範例·​2.​·​Message·​2</​div><div·​class="example-​contents"><pre·​class="literallayout"​>Subject:​·​Problems·​installing·​FreeBSD
  
230 I've·​just·​got·​the·​FreeBSD·​2.​1.​5·​CDROM·​from·​Walnut·​Creek,​·​and·​I'm·​having·​a·​lot230 I've·​just·​got·​the·​FreeBSD·​2.​1.​5·​CDROM·​from·​Walnut·​Creek,​·​and·​I'm·​having·​a·​lot
231 of·​difficulty·​installing·​it.​··​I·​have·​a·​66·​MHz·​486·​with·​16·​MB·​of231 of·​difficulty·​installing·​it.​··​I·​have·​a·​66·​MHz·​486·​with·​16·​MB·​of
232 memory·​and·​an·​Adaptec·​1540A·​SCSI·​board,​·​a·​1.​2GB·​Quantum·​Fireball232 memory·​and·​an·​Adaptec·​1540A·​SCSI·​board,​·​a·​1.​2GB·​Quantum·​Fireball
233 disk·​and·​a·​Toshiba·​3501XA·​CDROM·​drive.​··​The·​installation·​works·​just233 disk·​and·​a·​Toshiba·​3501XA·​CDROM·​drive.​··​The·​installation·​works·​just
234 fine,​·​but·​when·​I·​try·​to·​reboot·​the·​system,​·​I·​get·​the·​message234 fine,​·​but·​when·​I·​try·​to·​reboot·​the·​system,​·​I·​get·​the·​message
235 <span·​class="quote">“<span·​class="quote">Missing​·​Operating·​System</​span>”</​span>.​</​pre></​div></​div><br·​class="example-​break"·​/​></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="idp59520312"></​a>7.​·​How·​to·​follow·​up·​to·​a·​question</​h2></​div></​div></​div><p>Often·​you·​will·​want·​to·​send·​in·​additional·​information·​to·​a·​question235 <span·​class="quote">“<span·​class="quote">Missing​·​Operating·​System</​span>”</​span>.​</​pre></​div></​div><br·​class="example-​break"·​/​></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="idp59457592"></​a>7.​·​How·​to·​follow·​up·​to·​a·​question</​h2></​div></​div></​div><p>Often·​you·​will·​want·​to·​send·​in·​additional·​information·​to·​a·​question
236 ······​you·​have·​already·​sent.​··​The·​best·​way·​to·​do·​this·​is·​to·​reply·​to·​your236 ······​you·​have·​already·​sent.​··​The·​best·​way·​to·​do·​this·​is·​to·​reply·​to·​your
237 ······​original·​message.​··​This·​has·​three·​advantages:​</​p><div·​class="orderedlist"><​ol·​class="orderedlist"·​type="1"><li·​class="listitem"><p>Y​ou·​include·​the·​original·​message·​text,​·​so·​people·​will·​know·​what237 ······​original·​message.​··​This·​has·​three·​advantages:​</​p><div·​class="orderedlist"><​ol·​class="orderedlist"·​type="1"><li·​class="listitem"><p>Y​ou·​include·​the·​original·​message·​text,​·​so·​people·​will·​know·​what
238 »       ​··​you·​are·​talking·​about.​··​Do·​not·​forget·​to·​trim·​unnecessary·​text·​out,​238 »       ​··​you·​are·​talking·​about.​··​Do·​not·​forget·​to·​trim·​unnecessary·​text·​out,​
239 »       ​··​though.​</​p></​li><li·​class="listitem"><p>T​he·​text·​in·​the·​subject·​line·​stays·​the·​same·​(you·​did·​remember·​to239 »       ​··​though.​</​p></​li><li·​class="listitem"><p>T​he·​text·​in·​the·​subject·​line·​stays·​the·​same·​(you·​did·​remember·​to
240 »       ​··​put·​one·​in,​·​did·​you·​not?)​.​··​Many·​mailers·​will·​sort·​messages·​by240 »       ​··​put·​one·​in,​·​did·​you·​not?)​.​··​Many·​mailers·​will·​sort·​messages·​by
241 »       ​··​subject.​·​This·​helps·​group·​messages·​together.​</​p></​li><li·​class="listitem"><p>T​he·​message·​reference·​numbers·​in·​the·​header·​will·​refer·​to·​the241 »       ​··​subject.​·​This·​helps·​group·​messages·​together.​</​p></​li><li·​class="listitem"><p>T​he·​message·​reference·​numbers·​in·​the·​header·​will·​refer·​to·​the
242 »       ​··​previous·​message.​··​Some·​mailers,​·​such·​as242 »       ​··​previous·​message.​··​Some·​mailers,​·​such·​as
243 »       ​··​<a·​class="link"·​href="http:​/​/​www.​mutt.​org/​"·​target="_top">mutt</​a>,​·​can243 »       ​··​<a·​class="link"·​href="http:​/​/​www.​mutt.​org/​"·​target="_top">mutt</​a>,​·​can
244 »       ​··​<span·​class="emphasis"><em>​thread</​em></​span>·​messages,​·​showing·​the·​exact244 »       ​··​<span·​class="emphasis"><em>​thread</​em></​span>·​messages,​·​showing·​the·​exact
245 »       ​··​relationships·​between·​the·​messages.​</​p></​li></​ol></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="idp59534648"></​a>8.​·​How·​to·​answer·​a·​question</​h2></​div></​div></​div><p>Before·​you·​answer·​a·​question·​to·​FreeBSD-​questions,​·​consider:​</​p><div·​class="orderedlist"><​ol·​class="orderedlist"·​type="1"><li·​class="listitem"><p>A​·​lot·​of·​the·​points·​on·​submitting·​questions·​also·​apply·​to245 »       ​··​relationships·​between·​the·​messages.​</​p></​li></​ol></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="idp59476024"></​a>8.​·​How·​to·​answer·​a·​question</​h2></​div></​div></​div><p>Before·​you·​answer·​a·​question·​to·​FreeBSD-​questions,​·​consider:​</​p><div·​class="orderedlist"><​ol·​class="orderedlist"·​type="1"><li·​class="listitem"><p>A​·​lot·​of·​the·​points·​on·​submitting·​questions·​also·​apply·​to
246 »       ​··​answering·​questions.​··​Read·​them.​</​p></​li><li·​class="listitem"><p>H​as·​somebody·​already·​answered·​the·​question?··​The·​easiest·​way·​to246 »       ​··​answering·​questions.​··​Read·​them.​</​p></​li><li·​class="listitem"><p>H​as·​somebody·​already·​answered·​the·​question?··​The·​easiest·​way·​to
247 »       ​··​check·​this·​is·​to·​sort·​your·​incoming·​mail·​by·​subject:​·​then247 »       ​··​check·​this·​is·​to·​sort·​your·​incoming·​mail·​by·​subject:​·​then
248 »       ​··​(hopefully)​·​you·​will·​see·​the·​question·​followed·​by·​any·​answers,​·​all248 »       ​··​(hopefully)​·​you·​will·​see·​the·​question·​followed·​by·​any·​answers,​·​all
249 »       ​··​together.​</​p><p>If·​somebody·​has·​already·​answered·​it,​·​it·​does·​not·​automatically249 »       ​··​together.​</​p><p>If·​somebody·​has·​already·​answered·​it,​·​it·​does·​not·​automatically
250 »       ​··​mean·​that·​you·​should·​not·​send·​another·​answer.​··​But·​it·​makes·​sense·​to250 »       ​··​mean·​that·​you·​should·​not·​send·​another·​answer.​··​But·​it·​makes·​sense·​to
251 »       ​··​read·​all·​the·​other·​answers·​first.​</​p></​li><li·​class="listitem"><p>D​o·​you·​have·​something·​to·​contribute·​beyond·​what·​has·​already·​been251 »       ​··​read·​all·​the·​other·​answers·​first.​</​p></​li><li·​class="listitem"><p>D​o·​you·​have·​something·​to·​contribute·​beyond·​what·​has·​already·​been
252 »       ​··​said?··​In·​general,​·​<span·​class="quote">“<span·​class="quote">Yeah,​·​me·​too</​span>”</​span>·​answers·​do·​not·​help252 »       ​··​said?··​In·​general,​·​<span·​class="quote">“<span·​class="quote">Yeah,​·​me·​too</​span>”</​span>·​answers·​do·​not·​help
/usr/local/share/doc/freebsd/zh_TW.UTF-8/articles/hubs/article.html
Offset 1, 9 lines modifiedOffset 1, 9 lines modified
1 <?xml·​version="1.​0"·​encoding="utf-​8"?>1 <?xml·​version="1.​0"·​encoding="utf-​8"?>
2 <!DOCTYPE·​html·​PUBLIC·​"-​/​/​W3C/​/​DTD·​XHTML·​1.​0·​Transitional/​/​EN"·​"http:​/​/​www.​w3.​org/​TR/​xhtml1/​DTD/​xhtml1-​transitional.​dtd"><html·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"><head><meta·​http-​equiv="Content-​Type"·​content="text/​html;​·​charset=utf-​8"·​/​><title>Mirroring·​FreeBSD</​title><link·​rel="stylesheet"·​type="text/​css"·​href="docbook.​css"·​/​><link·​rev="made"·​href="mailto:​doc@FreeBSD.​org"·​/​><meta·​name="generator"·​content="DocBook·​XSL·​Stylesheets·​V1.​78.​1"·​/​><meta·​name="description"·​content="這是份還在草稿中的文章,​主要是(尤其是給各區網中心管理者的參考)​介紹如何·​mirror·​FreeBSD。"·​/​><script·​xmlns=""·​type="text/​javascript"·​src="/​layout/​js/​google.​js"></​script></​head><body><div·​xml:​lang="zh_tw"·​class="article"·​lang="zh_tw"><div·​xmlns=""·​class="titlepage"><di​v><div><h1·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60868408"></​a>Mirroring·​FreeBSD</​h1></​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="authorgroup"><​div·​class="author"><h3·​class="author"><span·​class="firstname">Jun​</​span>·​<span·​class="surname">Kuriy​ama</​span></​h3><div·​class="aff·​✂2 <!DOCTYPE·​html·​PUBLIC·​"-​/​/​W3C/​/​DTD·​XHTML·​1.​0·​Transitional/​/​EN"·​"http:​/​/​www.​w3.​org/​TR/​xhtml1/​DTD/​xhtml1-​transitional.​dtd"><html·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"><head><meta·​http-​equiv="Content-​Type"·​content="text/​html;​·​charset=utf-​8"·​/​><title>Mirroring·​FreeBSD</​title><link·​rel="stylesheet"·​type="text/​css"·​href="docbook.​css"·​/​><link·​rev="made"·​href="mailto:​doc@FreeBSD.​org"·​/​><meta·​name="generator"·​content="DocBook·​XSL·​Stylesheets·​V1.​78.​1"·​/​><meta·​name="description"·​content="這是份還在草稿中的文章,​主要是(尤其是給各區網中心管理者的參考)​介紹如何·​mirror·​FreeBSD。"·​/​><script·​xmlns=""·​type="text/​javascript"·​src="/​layout/​js/​google.​js"></​script></​head><body><div·​xml:​lang="zh_tw"·​class="article"·​lang="zh_tw"><div·​xmlns=""·​class="titlepage"><di​v><div><h1·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60741432"></​a>Mirroring·​FreeBSD</​h1></​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="authorgroup"><​div·​class="author"><h3·​class="author"><span·​class="firstname">Jun​</​span>·​<span·​class="surname">Kuriy​ama</​span></​h3><div·​class="aff·​✂
3 ··​John·​D.​·​Polstra·​的註冊商標。</​p><p>許多製造商和經銷商使用一些稱為商​標的圖案或文字設計來彰顯自己的產品。3 ··​John·​D.​·​Polstra·​的註冊商標。</​p><p>許多製造商和經銷商使用一些稱為商​標的圖案或文字設計來彰顯自己的產品。
4 ··​本文中出現的眾多商標,以及·​FreeBSD·​Project·​本身廣所人知的商標,後面將以·​'™'·​或·​'®'·​符號來標註。</​p></​div></​div><div>··​2014-​05-​29·​由·​lwhsu.​</​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="abstract"><div​·​class="abstract-​title">摘要</​div><p>這是份還在草稿中的文章,主要​是(尤其是給各區網中心管理者的參考)​介紹如何·​mirror·​FreeBSD。</​p></​div></​div></​div><div·​class="docformatnavi"​>4 ··​本文中出現的眾多商標,以及·​FreeBSD·​Project·​本身廣所人知的商標,後面將以·​'™'·​或·​'®'·​符號來標註。</​p></​div></​div><div>··​2014-​05-​29·​由·​lwhsu.​</​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="abstract"><div​·​class="abstract-​title">摘要</​div><p>這是份還在草稿中的文章,主要​是(尤其是給各區網中心管理者的參考)​介紹如何·​mirror·​FreeBSD。</​p></​div></​div></​div><div·​class="docformatnavi"​>
5 ······​[5 ······​[
6 ······​<a·​href="index.​html">章節模式</​a>6 ······​<a·​href="index.​html">章節模式</​a>
7 ······​/​7 ······​/​
8 ······8 ······
9 »       ​··​完整模式9 »       ​··​完整模式
/usr/local/share/doc/freebsd/zh_TW.UTF-8/articles/mailing-list-faq/article.html
Offset 1, 9 lines modifiedOffset 1, 9 lines modified
1 <?xml·​version="1.​0"·​encoding="utf-​8"?>1 <?xml·​version="1.​0"·​encoding="utf-​8"?>
2 <!DOCTYPE·​html·​PUBLIC·​"-​/​/​W3C/​/​DTD·​XHTML·​1.​0·​Transitional/​/​EN"·​"http:​/​/​www.​w3.​org/​TR/​xhtml1/​DTD/​xhtml1-​transitional.​dtd"><html·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"><head><meta·​http-​equiv="Content-​Type"·​content="text/​html;​·​charset=utf-​8"·​/​><title>FreeBSD·​Mailing·​Lists·​常見問答集</​title><link·​rel="stylesheet"·​type="text/​css"·​href="docbook.​css"·​/​><link·​rev="made"·​href="mailto:​doc@FreeBSD.​org"·​/​><meta·​name="generator"·​content="DocBook·​XSL·​Stylesheets·​V1.​78.​1"·​/​><meta·​name="description"·​content="這是有關·​FreeBSD·​mailing·​lists·​的·​FAQ。如果您對協助本文件/​翻譯計畫·​的進行有興趣的話,請寄·​e-​mail·​到·​FreeBSD·​documentation·​project·​郵遞論壇。此外,隨時可從·​FreeBSD·​網站·​拿到這份文件的最新版本。·​也可以利用·​HTTP·​來下載·​HTML·​文件,或是經由·​FreeBSD·​FTP·​站·​下載純文字、PostScript、或·​PDF·​版本的檔案。·​您也可以在這裡使用·​搜尋·​FAQ·​資料·​的功能。"·​/​><script·​xmlns=""·​type="text/​javascript"·​src="/​layout/​js/​google.​js"></​script></​head><body><div·​xml:​lang="zh_tw"·​class="article"·​lang="zh_tw"><div·​xmlns=""·​class="titlepage"><di​v><div><h1·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60876600"></​a>FreeBSD·​Mailing·​Lists·​常見問答集</​h1></​di·​✂2 <!DOCTYPE·​html·​PUBLIC·​"-​/​/​W3C/​/​DTD·​XHTML·​1.​0·​Transitional/​/​EN"·​"http:​/​/​www.​w3.​org/​TR/​xhtml1/​DTD/​xhtml1-​transitional.​dtd"><html·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"><head><meta·​http-​equiv="Content-​Type"·​content="text/​html;​·​charset=utf-​8"·​/​><title>FreeBSD·​Mailing·​Lists·​常見問答集</​title><link·​rel="stylesheet"·​type="text/​css"·​href="docbook.​css"·​/​><link·​rev="made"·​href="mailto:​doc@FreeBSD.​org"·​/​><meta·​name="generator"·​content="DocBook·​XSL·​Stylesheets·​V1.​78.​1"·​/​><meta·​name="description"·​content="這是有關·​FreeBSD·​mailing·​lists·​的·​FAQ。如果您對協助本文件/​翻譯計畫·​的進行有興趣的話,請寄·​e-​mail·​到·​FreeBSD·​documentation·​project·​郵遞論壇。此外,隨時可從·​FreeBSD·​網站·​拿到這份文件的最新版本。·​也可以利用·​HTTP·​來下載·​HTML·​文件,或是經由·​FreeBSD·​FTP·​站·​下載純文字、PostScript、或·​PDF·​版本的檔案。·​您也可以在這裡使用·​搜尋·​FAQ·​資料·​的功能。"·​/​><script·​xmlns=""·​type="text/​javascript"·​src="/​layout/​js/​google.​js"></​script></​head><body><div·​xml:​lang="zh_tw"·​class="article"·​lang="zh_tw"><div·​xmlns=""·​class="titlepage"><di​v><div><h1·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp57162552"></​a>FreeBSD·​Mailing·​Lists·​常見問答集</​h1></​di·​✂
3 »       ​的進行有興趣的話,請寄·​e-​mail·​到3 »       ​的進行有興趣的話,請寄·​e-​mail·​到
4 »       ​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​doc"·​target="_top">FreeBSD​·​documentation·​project·​郵遞論壇</​a>。此外,隨時可從·​<a·​class="link"·​href="http:​/​/​www.​FreeBSD.​org/​doc/​en_US.​ISO8859-​1/​articles/​mailing-​list-​faq/​index.​html"·​target="_top">4 »       ​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​doc"·​target="_top">FreeBSD​·​documentation·​project·​郵遞論壇</​a>。此外,隨時可從·​<a·​class="link"·​href="http:​/​/​www.​FreeBSD.​org/​doc/​en_US.​ISO8859-​1/​articles/​mailing-​list-​faq/​index.​html"·​target="_top">
5 »       ​FreeBSD·​網站</​a>·​拿到這份文件的最新版本。5 »       ​FreeBSD·​網站</​a>·​拿到這份文件的最新版本。
6 »       ​也可以利用·​HTTP·​來下載·​<a·​class="link"·​href="article.​html"·​target="_top">HTML</​a>6 »       ​也可以利用·​HTTP·​來下載·​<a·​class="link"·​href="article.​html"·​target="_top">HTML</​a>
7 »       ​文件,或是經由·​<a·​class="link"·​href="ftp:​/​/​ftp.​FreeBSD.​org/​pub/​FreeBSD/​doc/​"·​target="_top">7 »       ​文件,或是經由·​<a·​class="link"·​href="ftp:​/​/​ftp.​FreeBSD.​org/​pub/​FreeBSD/​doc/​"·​target="_top">
8 »       ​FreeBSD·​FTP·​站</​a>·​下載純文字、<span·​class="trademark">Pos​tScript</​span>®、或·​PDF·​版本的檔案。8 »       ​FreeBSD·​FTP·​站</​a>·​下載純文字、<span·​class="trademark">Pos​tScript</​span>®、或·​PDF·​版本的檔案。
9 »       ​您也可以在這裡使用9 »       ​您也可以在這裡使用
Offset 15, 42 lines modifiedOffset 15, 42 lines modified
15 ······15 ······
16 »       ​··​完整模式16 »       ​··​完整模式
17 »       ​17 »       ​
18 ······​]18 ······​]
19 ····​</​div><hr·​/​></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="sect1"><a·​href="#introduction">​1.​·​前言</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#etiquette">2.​·​Mailing·​List·​的參與禮儀</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#recurring">3.​·​Mailing·​Lists·​上的重複性問題</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#bikeshed">4.​·​什麼是·​"Bikeshed"·​呀?</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#acknowledgment​s">5.​·​致謝</​a></​span></​dt></​dl></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="introduction"></​a>1.​·​前言</​h2></​div></​div></​div><p>如同其他·​FAQs·​一樣,本文主要目的是希望涵蓋在·​FreeBSD·​mailing19 ····​</​div><hr·​/​></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="sect1"><a·​href="#introduction">​1.​·​前言</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#etiquette">2.​·​Mailing·​List·​的參與禮儀</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#recurring">3.​·​Mailing·​Lists·​上的重複性問題</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#bikeshed">4.​·​什麼是·​"Bikeshed"·​呀?</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#acknowledgment​s">5.​·​致謝</​a></​span></​dt></​dl></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="introduction"></​a>1.​·​前言</​h2></​div></​div></​div><p>如同其他·​FAQs·​一樣,本文主要目的是希望涵蓋在·​FreeBSD·​mailing
20 ······​lists·​上面的常見問題(當然,包括答案)​。20 ······​lists·​上面的常見問題(當然,包括答案)​。
21 ······​雖然,原本構想是希望能降低這些重複問題的網​路流量,但如今已被公認·​FAQs·​也是相當好用的資源之一。</​p><p>本文主要是描述社群之間所培養的一​些禮儀(或默契)​,但本文本身並非『聖旨』般的權威。21 ······​雖然,原本構想是希望能降低這些重複問題的網​路流量,但如今已被公認·​FAQs·​也是相當好用的資源之一。</​p><p>本文主要是描述社群之間所培養的一​些禮儀(或默契)​,但本文本身並非『聖旨』般的權威。
22 ·······​若發現本文內有任何技術瑕疵,或者是想建議可​以增加哪些部分的話,請送·​PR,或是·​email·​到·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​doc"·​target="_top">FreeBSD​·​documentation·​project·​郵遞論壇</​a>。謝囉!</​p><div·​class="qandaset"><a·​id="idp58242232"></​a><dl><dt>1.​1.​·​<a·​href="#idp58243256">F​reeBSD·​mailing·​lists·​的目的為何?</​a></​dt><dt>1.​2.​·​<a·​href="#idp58411320">F​reeBSD·​mailing·​lists·​的參與者有哪些?</​a></​dt><dt>1.​3.​·​<a·​href="#idp58487480">F​reeBSD·​mailing·​lists·​對任何人都是開放參與的嗎?</​a></​dt><dt>1.​4.​·​<a·​href="#idp59047608">要​怎麼訂閱呢?</​a></​dt><dt>1.​5.​·​<a·​href="#idp59210168">要​怎麼退訂?</​a></​dt><dt>1.​6.​·​<a·​href="#idp59316792">可​以找到舊信的資料庫嗎?</​a></​dt><dt>1.​7.​·​<a·​href="#idp59323576">m​ailing·​lists·​可有摘要版呢?</​a></​dt></​dl><table·​border="0"·​style="width:​·​100%;​"><colgroup><col·​align="left"·​width="1%"·​/​><col·​/​></​colgroup><tbody><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp58243256"></​a><a·​id="purpose"></​a><p><strong>1.​1.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>FreeB​SD·​mailing·​lists·​的目的為何?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign=·​✂22 ·······​若發現本文內有任何技術瑕疵,或者是想建議可​以增加哪些部分的話,請送·​PR,或是·​email·​到·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​doc"·​target="_top">FreeBSD​·​documentation·​project·​郵遞論壇</​a>。謝囉!</​p><div·​class="qandaset"><a·​id="idp58249016"></​a><dl><dt>1.​1.​·​<a·​href="#idp58249272">F​reeBSD·​mailing·​lists·​的目的為何?</​a></​dt><dt>1.​2.​·​<a·​href="#idp58295992">F​reeBSD·​mailing·​lists·​的參與者有哪些?</​a></​dt><dt>1.​3.​·​<a·​href="#idp58408504">F​reeBSD·​mailing·​lists·​對任何人都是開放參與的嗎?</​a></​dt><dt>1.​4.​·​<a·​href="#idp58967864">要​怎麼訂閱呢?</​a></​dt><dt>1.​5.​·​<a·​href="#idp58974136">要​怎麼退訂?</​a></​dt><dt>1.​6.​·​<a·​href="#idp59338552">可​以找到舊信的資料庫嗎?</​a></​dt><dt>1.​7.​·​<a·​href="#idp59345464">m​ailing·​lists·​可有摘要版呢?</​a></​dt></​dl><table·​border="0"·​style="width:​·​100%;​"><colgroup><col·​align="left"·​width="1%"·​/​><col·​/​></​colgroup><tbody><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp58249272"></​a><a·​id="purpose"></​a><p><strong>1.​1.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>FreeB​SD·​mailing·​lists·​的目的為何?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign=·​✂
23 »       ​····​而有些則主要是幾乎整體·​FreeBSD·​社群都可以隨意參與討論的。請看·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo"·​target="_top">這份清單</​a>·​上面有目前所有·​list·​的摘要說明。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp58487480"></​a><a·​id="participation-​who"></​a><p><strong>1.​3.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>FreeB​SD·​mailing·​lists·​對任何人都是開放參與的嗎?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>再重複一次​,這要看各個·​list·​的『版規(charter)​』定位而有所不同。23 »       ​····​而有些則主要是幾乎整體·​FreeBSD·​社群都可以隨意參與討論的。請看·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo"·​target="_top">這份清單</​a>·​上面有目前所有·​list·​的摘要說明。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp58408504"></​a><a·​id="participation-​who"></​a><p><strong>1.​3.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>FreeB​SD·​mailing·​lists·​對任何人都是開放參與的嗎?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>再重複一次​,這要看各個·​list·​的『版規(charter)​』定位而有所不同。
24 »       ​····​請在發文前,先注意閱讀該·​list·​的『版規(charter)​』,並遵守相關原則。24 »       ​····​請在發文前,先注意閱讀該·​list·​的『版規(charter)​』,並遵守相關原則。
25 »       ​····​如此一來,才會讓大家都能溝通更無礙。</​p><p>如果看了上一個問答內的清單之後,​還是不清楚要到哪個·​list·​去發問的話,25 »       ​····​如此一來,才會讓大家都能溝通更無礙。</​p><p>如果看了上一個問答內的清單之後,​還是不清楚要到哪個·​list·​去發問的話,
26 »       ​····​那麼可以試著把問題丟到·​freebsd-​questions·​看看(但請先看下面講的補充)​。</​p><p>請注意:習慣上所有·​mailing·​lists·​都是開放發表討論的,也不必得先成為訂閱會員​才行。26 »       ​····​那麼可以試著把問題丟到·​freebsd-​questions·​看看(但請先看下面講的補充)​。</​p><p>請注意:習慣上所有·​mailing·​lists·​都是開放發表討論的,也不必得先成為訂閱會員​才行。
27 »       ​····​這是相當審慎的選擇,來讓參與·​FreeBSD·​社群更輕鬆容易,並鼓勵互相分享彼此的想法。​27 »       ​····​這是相當審慎的選擇,來讓參與·​FreeBSD·​社群更輕鬆容易,並鼓勵互相分享彼此的想法。​
28 »       ​····​然而,由於過去有些人的濫用,有些·​lists·​現在開始限制參與討論的部分,以避免不必要的​困擾。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59047608"></​a><a·​id="subscribe"></​a><p><strong>1.​4.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>要怎麼訂閱​呢?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>可以用·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo"·​target="_top">28 »       ​····​然而,由於過去有些人的濫用,有些·​lists·​現在開始限制參與討論的部分,以避免不必要的​困擾。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp58967864"></​a><a·​id="subscribe"></​a><p><strong>1.​4.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>要怎麼訂閱​呢?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>可以用·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo"·​target="_top">
29 »       ​····​Mailman·​網頁介面</​a>·​來訂閱任何公開的·​lists。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59210168"></​a><a·​id="unsubscribe"></​a><p><strong>1.​5.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>要怎麼退訂​?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>一樣請用剛​上面說的網頁介面,或者·​mailing·​list·​上面每封信結尾處都會有相關·​URL·​連結的指示說明。</​p><p>千萬請不要直接寫信到這些公開的·​mailing·​lists·​說你要退訂。29 »       ​····​Mailman·​網頁介面</​a>·​來訂閱任何公開的·​lists。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp58974136"></​a><a·​id="unsubscribe"></​a><p><strong>1.​5.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>要怎麼退訂​?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>一樣請用剛​上面說的網頁介面,或者·​mailing·​list·​上面每封信結尾處都會有相關·​URL·​連結的指示說明。</​p><p>千萬請不要直接寫信到這些公開的·​mailing·​lists·​說你要退訂。
30 »       ​····​首先呢.​.​因為本來就不是這樣退訂的,其次你會惹來眾怒​而招來圍剿、筆戰。30 »       ​····​首先呢.​.​因為本來就不是這樣退訂的,其次你會惹來眾怒​而招來圍剿、筆戰。
31 »       ​····​這是很典型的退訂錯誤示範,請不要這樣做。<​/​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59316792"></​a><a·​id="archives"></​a><p><strong>1.​6.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>可以找到舊​信的資料庫嗎?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>嗯,有!可​以在·​<a·​class="link"·​href="http:​/​/​docs.​FreeBSD.​org/​mail/​"·​target="_top">這邊</​a>31 »       ​····​這是很典型的退訂錯誤示範,請不要這樣做。<​/​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59338552"></​a><a·​id="archives"></​a><p><strong>1.​6.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>可以找到舊​信的資料庫嗎?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>嗯,有!可​以在·​<a·​class="link"·​href="http:​/​/​docs.​FreeBSD.​org/​mail/​"·​target="_top">這邊</​a>
32 »       ​····​找到相關的舊信資料庫(archive)​。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59323576"></​a><a·​id="digest"></​a><p><strong>1.​7.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>maili​ng·​lists·​可有摘要版呢?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>當然也有,​請看·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo"·​target="_top">32 »       ​····​找到相關的舊信資料庫(archive)​。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59345464"></​a><a·​id="digest"></​a><p><strong>1.​7.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>maili​ng·​lists·​可有摘要版呢?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>當然也有,​請看·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo"·​target="_top">
33 »       ​····​Mailman·​網頁介面</​a>。</​p></​td></​tr></​tbody></​table></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="etiquette"></​a>2.​·​Mailing·​List·​的參與禮儀</​h2></​div></​div></​div><p>在·​mailing·​lists·​上參與討論,就像在其他社群一樣,我們都需要​一些溝通上的共識。33 »       ​····​Mailman·​網頁介面</​a>。</​p></​td></​tr></​tbody></​table></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="etiquette"></​a>2.​·​Mailing·​List·​的參與禮儀</​h2></​div></​div></​div><p>在·​mailing·​lists·​上參與討論,就像在其他社群一樣,我們都需要​一些溝通上的共識。
34 ······​發言請注重禮儀(或默契)​,切勿無的放矢。</​p><div·​class="qandaset"><a·​id="idp59337144"></​a><dl><dt>2.​1.​·​<a·​href="#idp59338552">在​發文之前,有什麼注意事項呢?</​a></​dt><dt>2.​2.​·​<a·​href="#idp59355192">如​何避免不當發文呢?</​a></​dt><dt>2.​3.​·​<a·​href="#idp59379640">發​文時,有什麼該注意的嗎?</​a></​dt><dt>2.​4.​·​<a·​href="#idp59484728">在​·​mailing·​lists·​上回文的話,有什麼要特別注意的嗎?</​a></​dt></​dl><table·​border="0"·​style="width:​·​100%;​"><colgroup><col·​align="left"·​width="1%"·​/​><col·​/​></​colgroup><tbody><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59338552"></​a><a·​id="before-​posting"></​a><p><strong>2.​1.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>在發文之前​,有什麼注意事項呢?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>最重要的是​你已經看了這篇文章,然而,若您對·​FreeBSD·​不熟的話,34 ······​發言請注重禮儀(或默契)​,切勿無的放矢。</​p><div·​class="qandaset"><a·​id="idp59355064"></​a><dl><dt>2.​1.​·​<a·​href="#idp59355704">在​發文之前,有什麼注意事項呢?</​a></​dt><dt>2.​2.​·​<a·​href="#idp59388088">如​何避免不當發文呢?</​a></​dt><dt>2.​3.​·​<a·​href="#idp59400248">發​文時,有什麼該注意的嗎?</​a></​dt><dt>2.​4.​·​<a·​href="#idp59494712">在​·​mailing·​lists·​上回文的話,有什麼要特別注意的嗎?</​a></​dt></​dl><table·​border="0"·​style="width:​·​100%;​"><colgroup><col·​align="left"·​width="1%"·​/​><col·​/​></​colgroup><tbody><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59355704"></​a><a·​id="before-​posting"></​a><p><strong>2.​1.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>在發文之前​,有什麼注意事項呢?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>最重要的是​你已經看了這篇文章,然而,若您對·​FreeBSD·​不熟的話,
35 »       ​····​可能需要先廣泛閱讀35 »       ​····​可能需要先廣泛閱讀
36 »       ​····​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​docs/​books.​html"·​target="_top">相關書籍及文章​</​a>36 »       ​····​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​docs/​books.​html"·​target="_top">相關書籍及文章​</​a>
37 »       ​·····​來先熟悉這套作業系統和一些典故,尤其是其中​的·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​books/​faq/​index.​html"·​target="_top">37 »       ​·····​來先熟悉這套作業系統和一些典故,尤其是其中​的·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​books/​faq/​index.​html"·​target="_top">
38 »       ​····​FreeBSD·​常見問答集·​(FAQ)​</​a>·​文件,38 »       ​····​FreeBSD·​常見問答集·​(FAQ)​</​a>·​文件,
39 »       ​····​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​books/​handbook/​index.​html"·​target="_top">39 »       ​····​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​books/​handbook/​index.​html"·​target="_top">
40 »       ​····​FreeBSD·​使用手冊(Handbook)​</​a>,40 »       ​····​FreeBSD·​使用手冊(Handbook)​</​a>,
41 »       ​····​以及相關文章:<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​freebsd-​questions/​article.​html"·​target="_top">41 »       ​····​以及相關文章:<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​freebsd-​questions/​article.​html"·​target="_top">
42 »       ​····​How·​to·​get·​best·​results·​from·​the·​FreeBSD-​questions·​mailing·​list</​a>、42 »       ​····​How·​to·​get·​best·​results·​from·​the·​FreeBSD-​questions·​mailing·​list</​a>、
43 »       ​····​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​explaining-​bsd/​article.​html"·​target="_top">43 »       ​····​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​explaining-​bsd/​article.​html"·​target="_top">
44 »       ​····​Explaining·​BSD</​a>、以及·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​new-​users/​article.​html"·​target="_top">44 »       ​····​Explaining·​BSD</​a>、以及·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​new-​users/​article.​html"·​target="_top">
45 »       ​····​FreeBSD·​First·​Steps</​a>。</​p><p>此外,對上述文件內已有解答的部份​又提出來問的話,會被認為是相當不禮貌的。45 »       ​····​FreeBSD·​First·​Steps</​a>。</​p><p>此外,對上述文件內已有解答的部份​又提出來問的話,會被認為是相當不禮貌的。
46 »       ​····​這並不是因為這群志工是相當吝於回答的,而是​一再被相同的問題不斷疲勞轟炸之後,所產生的​挫折感很重。46 »       ​····​這並不是因為這群志工是相當吝於回答的,而是​一再被相同的問題不斷疲勞轟炸之後,所產生的​挫折感很重。
47 »       ​····​尤其是現成答案明明就在眼前,卻仍同樣問題滿​天飛,這實在是.​.​.​。47 »       ​····​尤其是現成答案明明就在眼前,卻仍同樣問題滿​天飛,這實在是.​.​.​。
48 »       ​····​請注意:這些·​FreeBSD·​相關文件幾乎都是由一群無薪志工的好心成果,​而他們也是人。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59355192"></​a><a·​id="inappropriate"></​a><p><strong>2.​2.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>如何避免不​當發文呢?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>發​文時,請務必遵守該·​mailing·​list·​的遊戲規則。</​p></​li><li·​class="listitem"><p>不​要作人身攻擊。好的網路公民,應該要有更高的​言行標準。</​p></​li><li·​class="listitem"><p>請​不要試圖作·​Spam·​行為(廣告、轉貼多處等不請自來行為)​。48 »       ​····​請注意:這些·​FreeBSD·​相關文件幾乎都是由一群無薪志工的好心成果,​而他們也是人。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59388088"></​a><a·​id="inappropriate"></​a><p><strong>2.​2.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>如何避免不​當發文呢?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>發​文時,請務必遵守該·​mailing·​list·​的遊戲規則。</​p></​li><li·​class="listitem"><p>不​要作人身攻擊。好的網路公民,應該要有更高的​言行標準。</​p></​li><li·​class="listitem"><p>請​不要試圖作·​Spam·​行為(廣告、轉貼多處等不請自來行為)​。
49 »       ​»       ​所有·​mailing·​lists·​都會積極禁止這些違規者,一旦有的話,那麼後​果請自行負責。</​p></​li></​ul></​div></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59379640"></​a><a·​id="etiquette-​posting"></​a><p><strong>2.​3.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>發文時,有​什麼該注意的嗎?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>發​文時,請保持一行約·​75·​個字元就自動斷行,因為並不是每個看的人都有​很炫的圖形介面(GUI)​看信軟體。</​p></​li><li·​class="listitem"><p>請​注意:事實上,網路頻寬並不是無限的。49 »       ​»       ​所有·​mailing·​lists·​都會積極禁止這些違規者,一旦有的話,那麼後​果請自行負責。</​p></​li></​ul></​div></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59400248"></​a><a·​id="etiquette-​posting"></​a><p><strong>2.​3.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>發文時,有​什麼該注意的嗎?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>發​文時,請保持一行約·​75·​個字元就自動斷行,因為並不是每個看的人都有​很炫的圖形介面(GUI)​看信軟體。</​p></​li><li·​class="listitem"><p>請​注意:事實上,網路頻寬並不是無限的。
50 »       ​»       ​並非每個讀者的頻寬都很大,所以若想貼一些像​是·​<code·​class="filename">conf​ig.​log</​code>50 »       ​»       ​並非每個讀者的頻寬都很大,所以若想貼一些像​是·​<code·​class="filename">conf​ig.​log</​code>
51 »       ​»       ​之類的設定檔內容,或是大量的·​stack·​trace·​紀錄,那麼請把它放在自己網站上,然後貼出該​網址·​URL·​就行了。51 »       ​»       ​之類的設定檔內容,或是大量的·​stack·​trace·​紀錄,那麼請把它放在自己網站上,然後貼出該​網址·​URL·​就行了。
52 »       ​»       ​還有一件事,請記住,這些信件都會被舊信資料​庫保存下來,所以這樣作會造成保存的資料庫會​很快被塞到很大,52 »       ​»       ​還有一件事,請記住,這些信件都會被舊信資料​庫保存下來,所以這樣作會造成保存的資料庫會​很快被塞到很大,
53 »       ​»       ​甚至可能塞爆·​Server·​的硬碟空間。</​p></​li><li·​class="listitem"><p>文​章是要讓人看得懂,所以請注意版面編排的可讀​性,還有.​.​53 »       ​»       ​甚至可能塞爆·​Server·​的硬碟空間。</​p></​li><li·​class="listitem"><p>文​章是要讓人看得懂,所以請注意版面編排的可讀​性,還有.​.​
54 »       ​»       ​千 萬 不 要 大 聲 嚷 叫!!!!!··​這點可不只·​FreeBSD·​mailing·​lists·​才需如此注意,54 »       ​»       ​千 萬 不 要 大 聲 嚷 叫!!!!!··​這點可不只·​FreeBSD·​mailing·​lists·​才需如此注意,
55 »       ​»       ​請勿低估文章『基本編排』的重要性、連鎖效應​。55 »       ​»       ​請勿低估文章『基本編排』的重要性、連鎖效應​。
56 »       ​»       ​信中的表達方式通常就代表著別人眼中的你,若​文章讓人看了很吃力(霧煞煞)​、拼字錯誤百出、56 »       ​»       ​信中的表達方式通常就代表著別人眼中的你,若​文章讓人看了很吃力(霧煞煞)​、拼字錯誤百出、
Offset 74, 15 lines modifiedOffset 74, 15 lines modified
74 »       ​»       ​請不要用手打,因為這不僅很苦,而且也可能打​錯字或亂掉原有格式。請直接把相關的·​log·​檔丟出來,74 »       ​»       ​請不要用手打,因為這不僅很苦,而且也可能打​錯字或亂掉原有格式。請直接把相關的·​log·​檔丟出來,
75 »       ​»       ​或是用編輯器來剪裁、或是用滑鼠複製/​貼上來完成。舉個例子,如果是要把像是·​<code·​class="command">dmesg​</​code>75 »       ​»       ​或是用編輯器來剪裁、或是用滑鼠複製/​貼上來完成。舉個例子,如果是要把像是·​<code·​class="command">dmesg​</​code>
76 »       ​»       ​的程式訊息倒入到某個檔案去的話,那麼作法如​下:</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>dmesg·​&gt;​·​/​tmp/​dmesg.​out</​code></​strong></​pre><p>這樣子會把訊息送到·​<code·​class="filename">/​tmp/​dmesg.​out</​code>·​檔內。</​p></​li><li·​class="listitem"><p>在​用滑鼠剪貼時,請注意是否有犯一些細節的剪貼​壞習慣。76 »       ​»       ​的程式訊息倒入到某個檔案去的話,那麼作法如​下:</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>dmesg·​&gt;​·​/​tmp/​dmesg.​out</​code></​strong></​pre><p>這樣子會把訊息送到·​<code·​class="filename">/​tmp/​dmesg.​out</​code>·​檔內。</​p></​li><li·​class="listitem"><p>在​用滑鼠剪貼時,請注意是否有犯一些細節的剪貼​壞習慣。
77 »       ​»       ​尤其是像貼·​<code·​class="filename">Make​files</​code>·​之類檔案時,由於·​<code·​class="literal">tab</​code>77 »       ​»       ​尤其是像貼·​<code·​class="filename">Make​files</​code>·​之類檔案時,由於·​<code·​class="literal">tab</​code>
78 »       ​»       ​鍵所打出來的分格,是屬於特殊字元。因此,在​·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​support.​html#gnats"·​target="_top">78 »       ​»       ​鍵所打出來的分格,是屬於特殊字元。因此,在​·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​support.​html#gnats"·​target="_top">
79 »       ​»       ​GNATS·​PR·​資料庫</​a>·​上很常看到這類很常見的惱人問題:79 »       ​»       ​GNATS·​PR·​資料庫</​a>·​上很常看到這類很常見的惱人問題:
80 »       ​»       ​<code·​class="filename">Make​files</​code>·​內的·​tab·​經過剪貼後,變成『空白(white·​space)​』80 »       ​»       ​<code·​class="filename">Make​files</​code>·​內的·​tab·​經過剪貼後,變成『空白(white·​space)​』
81 »       ​»       ​或是困擾的·​<code·​class="literal">=3B</​code>·​escape·​sequence,這些會讓·​committers·​們十分不爽。</​p></​li></​ul></​div></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59484728"></​a><a·​id="etiquette-​replying"></​a><p><strong>2.​4.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>在·​mailing·​lists·​上回文的話,有什麼要特別注意的嗎?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>請​適當調整文章引言長度。回文時,引言部份請引​『有談到的』部分為主,但請不要過與不及。81 »       ​»       ​或是困擾的·​<code·​class="literal">=3B</​code>·​escape·​sequence,這些會讓·​committers·​們十分不爽。</​p></​li></​ul></​div></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59494712"></​a><a·​id="etiquette-​replying"></​a><p><strong>2.​4.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>在·​mailing·​lists·​上回文的話,有什麼要特別注意的嗎?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>請​適當調整文章引言長度。回文時,引言部份請引​『有談到的』部分為主,但請不要過與不及。
82 »       ​»       ​應該保留涉及討論範圍的原文,這樣子才能讓沒​看過前面文章的人知道是在講什麼,而非一頭霧​水。</​p><p>還有一點也很重要,原文若是幅度相​當長的話,記得註明·​"yes,​·​I·​see·​this·​too"。</​p></​li><li·​class="listitem"><p>善​用技巧來確認原文與自己寫的部份:82 »       ​»       ​應該保留涉及討論範圍的原文,這樣子才能讓沒​看過前面文章的人知道是在講什麼,而非一頭霧​水。</​p><p>還有一點也很重要,原文若是幅度相​當長的話,記得註明·​"yes,​·​I·​see·​this·​too"。</​p></​li><li·​class="listitem"><p>善​用技巧來確認原文與自己寫的部份:
83 »       ​»       ​通常會在原文的每行前面加上·​<span·​class="quote">“<span·​class="quote"><code·​class="literal">&gt;​·​</​code></​span>”</​span>·​以作記號。83 »       ​»       ​通常會在原文的每行前面加上·​<span·​class="quote">“<span·​class="quote"><code·​class="literal">&gt;​·​</​code></​span>”</​span>·​以作記號。
84 »       ​»       ​請記得保留·​<span·​class="quote">“<span·​class="quote"><code·​class="literal">&gt;​·​</​code></​span>”</​span>·​符號後面的空白,並且在原文以及你所寫的段落​之間加上空行,84 »       ​»       ​請記得保留·​<span·​class="quote">“<span·​class="quote"><code·​class="literal">&gt;​·​</​code></​span>”</​span>·​符號後面的空白,並且在原文以及你所寫的段落​之間加上空行,
85 »       ​»       ​以便閱讀。</​p></​li><li·​class="listitem"><p>請​不要斷章取義、穿鑿附會:通常對原始文章『斷​章取義』、『穿鑿附會』會讓大家很不爽,因為​他們原意並非如此,卻被曲解。</​p></​li><li·​class="listitem"><p>回​文時,不要寫在原文上面(<code·​class="literal">top·​post</​code>)​。85 »       ​»       ​以便閱讀。</​p></​li><li·​class="listitem"><p>請​不要斷章取義、穿鑿附會:通常對原始文章『斷​章取義』、『穿鑿附會』會讓大家很不爽,因為​他們原意並非如此,卻被曲解。</​p></​li><li·​class="listitem"><p>回​文時,不要寫在原文上面(<code·​class="literal">top·​post</​code>)​。
86 »       ​»       ​這個意思是:若要回文時,請寫在原文下方,不​要寫在原文上面,以免讓人有時空錯置的錯亂混​淆。</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​circle;​·​"><li·​class="listitem"><p>答​:·​Because·​it·​reverses·​the·​logical·​flow·​of86 »       ​»       ​這個意思是:若要回文時,請寫在原文下方,不​要寫在原文上面,以免讓人有時空錯置的錯亂混​淆。</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​circle;​·​"><li·​class="listitem"><p>答​:·​Because·​it·​reverses·​the·​logical·​flow·​of
87 »       ​»       ​····​conversation.​</​p></​li><li·​class="listitem"><p>問​:·​Why·​is·​top·​posting·​frowned·​upon?</​p></​li></​ul></​div><p>(感謝·​Randy·​Bush·​提供笑話)​</​p></​li></​ul></​div></​td></​tr></​tbody></​table></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="recurring"></​a>3.​·​Mailing·​Lists·​上的重複性問題</​h2></​div></​div></​div><p>在·​mailing·​lists·​上參與討論,就像在其他社群一樣,我們都需要​一些溝通上的共識。87 »       ​»       ​····​conversation.​</​p></​li><li·​class="listitem"><p>問​:·​Why·​is·​top·​posting·​frowned·​upon?</​p></​li></​ul></​div><p>(感謝·​Randy·​Bush·​提供笑話)​</​p></​li></​ul></​div></​td></​tr></​tbody></​table></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="recurring"></​a>3.​·​Mailing·​Lists·​上的重複性問題</​h2></​div></​div></​div><p>在·​mailing·​lists·​上參與討論,就像在其他社群一樣,我們都需要​一些溝通上的共識。
88 ······​許多·​mailing·​lists·​都會假設參與討論者都大致知道·​FreeBSD·​計劃的一些歷史淵源。88 ······​許多·​mailing·​lists·​都會假設參與討論者都大致知道·​FreeBSD·​計劃的一些歷史淵源。
/usr/local/share/doc/freebsd/zh_TW.UTF-8/articles/nanobsd/article.html
Offset 1, 20 lines modifiedOffset 1, 20 lines modified
1 <?xml·​version="1.​0"·​encoding="utf-​8"?>1 <?xml·​version="1.​0"·​encoding="utf-​8"?>
2 <!DOCTYPE·​html·​PUBLIC·​"-​/​/​W3C/​/​DTD·​XHTML·​1.​0·​Transitional/​/​EN"·​"http:​/​/​www.​w3.​org/​TR/​xhtml1/​DTD/​xhtml1-​transitional.​dtd"><html·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"><head><meta·​http-​equiv="Content-​Type"·​content="text/​html;​·​charset=utf-​8"·​/​><title>NanoBSD·​簡介</​title><link·​rel="stylesheet"·​type="text/​css"·​href="docbook.​css"·​/​><link·​rev="made"·​href="mailto:​doc@FreeBSD.​org"·​/​><meta·​name="generator"·​content="DocBook·​XSL·​Stylesheets·​V1.​78.​1"·​/​><meta·​name="description"·​content="這篇文件提供了關於·​NanoBSD·​工具的情報介紹,·​這工具可用來建立用於嵌入式環境應用程式的·​FreeBSD·​系統映像檔,·​以便存放到·​Compact·​Flash·​卡(或隨身碟)​。"·​/​><script·​xmlns=""·​type="text/​javascript"·​src="/​layout/​js/​google.​js"></​script></​head><body><div·​xml:​lang="zh_tw"·​class="article"·​lang="zh_tw"><div·​xmlns=""·​class="titlepage"><di​v><div><h1·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp56831288"></​a>NanoBSD·​簡介</​h1></​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="authorgroup"><​div·​class="author"><h3·​class="author"><span·​class="firstname">Dan​iel</​span>·​<span·​class="surname">Gerzo​</​·​✂2 <!DOCTYPE·​html·​PUBLIC·​"-​/​/​W3C/​/​DTD·​XHTML·​1.​0·​Transitional/​/​EN"·​"http:​/​/​www.​w3.​org/​TR/​xhtml1/​DTD/​xhtml1-​transitional.​dtd"><html·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"><head><meta·​http-​equiv="Content-​Type"·​content="text/​html;​·​charset=utf-​8"·​/​><title>NanoBSD·​簡介</​title><link·​rel="stylesheet"·​type="text/​css"·​href="docbook.​css"·​/​><link·​rev="made"·​href="mailto:​doc@FreeBSD.​org"·​/​><meta·​name="generator"·​content="DocBook·​XSL·​Stylesheets·​V1.​78.​1"·​/​><meta·​name="description"·​content="這篇文件提供了關於·​NanoBSD·​工具的情報介紹,·​這工具可用來建立用於嵌入式環境應用程式的·​FreeBSD·​系統映像檔,·​以便存放到·​Compact·​Flash·​卡(或隨身碟)​。"·​/​><script·​xmlns=""·​type="text/​javascript"·​src="/​layout/​js/​google.​js"></​script></​head><body><div·​xml:​lang="zh_tw"·​class="article"·​lang="zh_tw"><div·​xmlns=""·​class="titlepage"><di​v><div><h1·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60811704"></​a>NanoBSD·​簡介</​h1></​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="authorgroup"><​div·​class="author"><h3·​class="author"><span·​class="firstname">Dan​iel</​span>·​<span·​class="surname">Gerzo​</​·​✂
3 ··​本文中出現的眾多商標,以及·​FreeBSD·​Project·​本身廣所人知的商標,後面將以·​'™'·​或·​'®'·​符號來標註。</​p></​div></​div><div>··​2014-​05-​29·​由·​lwhsu.​</​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="abstract"><div​·​class="abstract-​title">摘要</​div><p>這篇文件提供了關於·​<span·​class="application">N​anoBSD</​span>·​工具的情報介紹,3 ··​本文中出現的眾多商標,以及·​FreeBSD·​Project·​本身廣所人知的商標,後面將以·​'™'·​或·​'®'·​符號來標註。</​p></​div></​div><div>··​2014-​05-​29·​由·​lwhsu.​</​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="abstract"><div​·​class="abstract-​title">摘要</​div><p>這篇文件提供了關於·​<span·​class="application">N​anoBSD</​span>·​工具的情報介紹,
4 »       ​這工具可用來建立用於嵌入式環境應用程式的·​FreeBSD·​系統映像檔,4 »       ​這工具可用來建立用於嵌入式環境應用程式的·​FreeBSD·​系統映像檔,
5 »       ​以便存放到·​Compact·​Flash·​卡(或隨身碟)​。</​p></​div></​div></​div><div·​class="docformatnavi"​>5 »       ​以便存放到·​Compact·​Flash·​卡(或隨身碟)​。</​p></​div></​div></​div><div·​class="docformatnavi"​>
6 ······​[6 ······​[
7 ······​<a·​href="index.​html">章節模式</​a>7 ······​<a·​href="index.​html">章節模式</​a>
8 ······​/​8 ······​/​
9 ······9 ······
10 »       ​··​完整模式10 »       ​··​完整模式
11 »       ​11 »       ​
12 ······​]12 ······​]
13 ····​</​div><hr·​/​></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="sect1"><a·​href="#intro">1.​·​NanoBSD·​簡介</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#howto">2.​·​如何使用·​NanoBSD</​a></​span></​dt><dt><span·​class="index"><a·​href="#idp59609912">索​引</​a></​span></​dt></​dl></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="intro"></​a>1.​·​NanoBSD·​簡介</​h2></​div></​div></​div><a·​id="idp58153400"·​class="indexterm"></​a><p><span·​class="application">N​anoBSD</​span>·​是·​Poul-​Henning·​Kamp·​目前正在開發的一項工具。13 ····​</​div><hr·​/​></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="sect1"><a·​href="#intro">1.​·​NanoBSD·​簡介</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#howto">2.​·​如何使用·​NanoBSD</​a></​span></​dt><dt><span·​class="index"><a·​href="#idp59559096">索​引</​a></​span></​dt></​dl></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="intro"></​a>1.​·​NanoBSD·​簡介</​h2></​div></​div></​div><a·​id="idp58141368"·​class="indexterm"></​a><p><span·​class="application">N​anoBSD</​span>·​是·​Poul-​Henning·​Kamp·​目前正在開發的一項工具。
14 ······​它可用來建立用於嵌入式環境應用程式的·​FreeBSD·​系統映像檔,14 ······​它可用來建立用於嵌入式環境應用程式的·​FreeBSD·​系統映像檔,
15 ······​以便存放到·​Compact·​Flash·​卡(或隨身碟,mass·​storage·​medium)​。</​p><p>這一工具也可以用來自製安裝映像檔​,15 ······​以便存放到·​Compact·​Flash·​卡(或隨身碟,mass·​storage·​medium)​。</​p><p>這一工具也可以用來自製安裝映像檔​,
16 ······​以簡化俗稱為·​<span·​class="quote">“<span·​class="quote">嵌入式系統(c​omputer·​appliances)​</​span>”</​span>·​的系統安裝、維護工作。16 ······​以簡化俗稱為·​<span·​class="quote">“<span·​class="quote">嵌入式系統(c​omputer·​appliances)​</​span>”</​span>·​的系統安裝、維護工作。
17 ······​通常,每個嵌入式系統產品都有限定硬體和軟體​,17 ······​通常,每個嵌入式系統產品都有限定硬體和軟體​,
18 ······​或者換言之,所有的應用程式都是預先裝好的。​18 ······​或者換言之,所有的應用程式都是預先裝好的。​
19 ······​這些設備可以直接放到現有的網路中,而且(幾​乎是)​立即使用。</​p><p><span·​class="application">N​anoBSD</​span>·​提供的功能包括:</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>可​以和·​FreeBSD·​一樣使用·​Ports·​和·​Packages·​——19 ······​這些設備可以直接放到現有的網路中,而且(幾​乎是)​立即使用。</​p><p><span·​class="application">N​anoBSD</​span>·​提供的功能包括:</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>可​以和·​FreeBSD·​一樣使用·​Ports·​和·​Packages·​——
20 »       ​··​所有的應用程序都可以在·​<span·​class="application">N​anoBSD</​span>·​中直接使用,20 »       ​··​所有的應用程序都可以在·​<span·​class="application">N​anoBSD</​span>·​中直接使用,
Offset 29, 59 lines modifiedOffset 29, 59 lines modified
29 »       ​····​可以將其掛載(mount)​到·​<code·​class="filename">/​cfg</​code>·​目錄下。</​p></​li></​ul></​div><p>這些分割區,在預設情況下是以​唯讀方式掛載。</​p><p><code·​class="filename">/​etc</​code>·​和29 »       ​····​可以將其掛載(mount)​到·​<code·​class="filename">/​cfg</​code>·​目錄下。</​p></​li></​ul></​div><p>這些分割區,在預設情況下是以​唯讀方式掛載。</​p><p><code·​class="filename">/​etc</​code>·​和
30 »       ​<code·​class="filename">/​var</​code>·​目錄均為30 »       ​<code·​class="filename">/​var</​code>·​目錄均為
31 »       ​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=md&amp;​sektion=4&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>md</​span>(4)​</​span></​a>(malloc)​磁碟。</​p><p>設定檔的分割區則是在31 »       ​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=md&amp;​sektion=4&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>md</​span>(4)​</​span></​a>(malloc)​磁碟。</​p><p>設定檔的分割區則是在
32 »       ​<code·​class="filename">/​cfg</​code>·​目錄。32 »       ​<code·​class="filename">/​cfg</​code>·​目錄。
33 »       ​它包含了用於·​<code·​class="filename">/​etc</​code>33 »       ​它包含了用於·​<code·​class="filename">/​etc</​code>
34 »       ​目錄的檔案,在啟動之後暫時以唯讀方式掛載。​·​因此,若想要重開機保留新的設定,34 »       ​目錄的檔案,在啟動之後暫時以唯讀方式掛載。​·​因此,若想要重開機保留新的設定,
35 »       ​那麼要記得從·​<code·​class="filename">/​etc</​code>·​把改過的檔案複製回35 »       ​那麼要記得從·​<code·​class="filename">/​etc</​code>·​把改過的檔案複製回
36 »       ​<code·​class="filename">/​cfg</​code>·​目錄才行。</​p><div·​class="example"><a·​id="idp58447160"></​a><div·​class="example-​title">範例·​1.​·​把修改過·​<code·​class="filename">/​etc/​resolv.​conf</​code>·​設定保存起來</​div><div·​class="example-​contents"><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>vi·​/​etc/​resolv.​conf</​code></​strong>36 »       ​<code·​class="filename">/​cfg</​code>·​目錄才行。</​p><div·​class="example"><a·​id="idp59041464"></​a><div·​class="example-​title">範例·​1.​·​把修改過·​<code·​class="filename">/​etc/​resolv.​conf</​code>·​設定保存起來</​div><div·​class="example-​contents"><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>vi·​/​etc/​resolv.​conf</​code></​strong>
37 [.​.​.​]37 [.​.​.​]
38 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>mount·​/​cfg</​code></​strong>38 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>mount·​/​cfg</​code></​strong>
39 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>cp·​/​etc/​resolv.​conf·​/​cfg</​code></​strong>39 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>cp·​/​etc/​resolv.​conf·​/​cfg</​code></​strong>
40 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>umount·​/​cfg</​code></​strong></​pre></​div></​div><br·​class="example-​break"·​/​><div·​xmlns=""·​class="note"><h3·​class="admontitle">注意​:​·​</​h3><p·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml">只有在系統啟動過程中,以及需​要修改設定檔的時候,才需要掛載含有40 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>umount·​/​cfg</​code></​strong></​pre></​div></​div><br·​class="example-​break"·​/​><div·​xmlns=""·​class="note"><h3·​class="admontitle">注意​:​·​</​h3><p·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml">只有在系統啟動過程中,以及需​要修改設定檔的時候,才需要掛載含有
41 »       ​··​<code·​class="filename">/​cfg</​code>·​的那個分割區。</​p><p·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml">一直都掛載·​<code·​class="filename">/​cfg</​code>41 »       ​··​<code·​class="filename">/​cfg</​code>·​的那個分割區。</​p><p·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml">一直都掛載·​<code·​class="filename">/​cfg</​code>
42 »       ​··​不是一個好主意,特別是當您把·​<span·​class="application">N​anoBSD</​span>42 »       ​··​不是一個好主意,特別是當您把·​<span·​class="application">N​anoBSD</​span>
43 »       ​··​放在不適合進行大量寫入動作的分割區時43 »       ​··​放在不適合進行大量寫入動作的分割區時
44 »       ​·​(比如:由於檔案系統的同步化會定期在系統碟​內寫入資料)​。</​p></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59345336"></​a>2.​2.​·​打造·​NanoBSD·​映像檔</​h3></​div></​div></​div><p><span·​class="application">N​anoBSD</​span>·​映像檔是透過使用非常簡單的44 »       ​·​(比如:由於檔案系統的同步化會定期在系統碟​內寫入資料)​。</​p></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59058360"></​a>2.​2.​·​打造·​NanoBSD·​映像檔</​h3></​div></​div></​div><p><span·​class="application">N​anoBSD</​span>·​映像檔是透過使用非常簡單的
45 »       ​<code·​class="filename">nano​bsd.​sh</​code>·​shell··​script·​來打造的,這個·​script·​可以在45 »       ​<code·​class="filename">nano​bsd.​sh</​code>·​shell··​script·​來打造的,這個·​script·​可以在
46 »       ​<code·​class="filename">/​usr/​src/​tools/​tools/​nanobsd</​code>46 »       ​<code·​class="filename">/​usr/​src/​tools/​tools/​nanobsd</​code>
47 »       ​目錄中找到。·​這個·​script·​建立的映像檔,可以用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=dd&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>dd</​span>(1)​</​span></​a>·​工具來複製到隨身碟上。</​p><p>打造47 »       ​目錄中找到。·​這個·​script·​建立的映像檔,可以用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=dd&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>dd</​span>(1)​</​span></​a>·​工具來複製到隨身碟上。</​p><p>打造
48 »       ​<span·​class="application">N​anoBSD</​span>·​映像檔所需的指令是:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>cd·​/​usr/​src/​tools/​tools/​nanobsd</​code></​strong>·​<a·​id="nbsd-​cd"></​a><span><img·​src="imagelib/​callouts/​1.​png"·​alt="1"·​border="0"·​/​></​span>48 »       ​<span·​class="application">N​anoBSD</​span>·​映像檔所需的指令是:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>cd·​/​usr/​src/​tools/​tools/​nanobsd</​code></​strong>·​<a·​id="nbsd-​cd"></​a><span><img·​src="imagelib/​callouts/​1.​png"·​alt="1"·​border="0"·​/​></​span>
49 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>sh·​nanobsd.​sh</​code></​strong>·​<a·​id="nbsd-​sh"></​a><span><img·​src="imagelib/​callouts/​2.​png"·​alt="2"·​border="0"·​/​></​span>49 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>sh·​nanobsd.​sh</​code></​strong>·​<a·​id="nbsd-​sh"></​a><span><img·​src="imagelib/​callouts/​2.​png"·​alt="2"·​border="0"·​/​></​span>
50 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>cd·​/​usr/​obj/​nanobsd.​full</​code></​strong>·​<a·​id="nbsd-​cd2"></​a><span><img·​src="imagelib/​callouts/​3.​png"·​alt="3"·​border="0"·​/​></​span>50 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>cd·​/​usr/​obj/​nanobsd.​full</​code></​strong>·​<a·​id="nbsd-​cd2"></​a><span><img·​src="imagelib/​callouts/​3.​png"·​alt="3"·​border="0"·​/​></​span>
51 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>dd·​if=_.​disk.​full·​of=/​dev/​da0·​bs=64k</​code></​strong>·​<a·​id="nbsd-​dd"></​a><span><img·​src="imagelib/​callouts/​4.​png"·​alt="4"·​border="0"·​/​></​span></​a>·​</​p></​td><td·​valign="top"·​align="left"><p>在隨身碟上​安裝·​<span·​class="application">N​anoBSD</​span>。</​p></​td></​tr></​table></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59397432"></​a>2.​3.​·​自行打造·​NanoBSD·​映像檔</​h3></​div></​div></​div><p>這可能是·​<span·​class="application">N​anoBSD</​span>·​最為重要,51 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>dd·​if=_.​disk.​full·​of=/​dev/​da0·​bs=64k</​code></​strong>·​<a·​id="nbsd-​dd"></​a><span><img·​src="imagelib/​callouts/​4.​png"·​alt="4"·​border="0"·​/​></​span></​a>·​</​p></​td><td·​valign="top"·​align="left"><p>在隨身碟上​安裝·​<span·​class="application">N​anoBSD</​span>。</​p></​td></​tr></​table></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59331000"></​a>2.​3.​·​自行打造·​NanoBSD·​映像檔</​h3></​div></​div></​div><p>這可能是·​<span·​class="application">N​anoBSD</​span>·​最為重要,
52 »       ​同時也是您最感興趣的功能。·​同時,在開發52 »       ​同時也是您最感興趣的功能。·​同時,在開發
53 »       ​<span·​class="application">N​anoBSD</​span>·​應用程式時,這也是相當耗時的過程。</​p><p>執行下面的指令將會53 »       ​<span·​class="application">N​anoBSD</​span>·​應用程式時,這也是相當耗時的過程。</​p><p>執行下面的指令將會
54 »       ​<code·​class="filename">nano​bsd.​sh</​code>·​讀取目前所在目錄的54 »       ​<code·​class="filename">nano​bsd.​sh</​code>·​讀取目前所在目錄的
55 »       ​<code·​class="filename">myco​nf.​nano</​code>·​檔的設定:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>sh·​nanobsd.​sh·​-​c·​myconf.​nano</​code></​strong></​pre><p>自行打造的流程,只需兩個步驟​:</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>自​訂選項</​p></​li><li·​class="listitem"><p>自​訂功能</​p></​li></​ul></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59416632"></​a>2.​3.​1.​·​自訂選項</​h4></​div></​div></​div><p>透過修改設定,可以設定用於55 »       ​<code·​class="filename">myco​nf.​nano</​code>·​檔的設定:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>sh·​nanobsd.​sh·​-​c·​myconf.​nano</​code></​strong></​pre><p>自行打造的流程,只需兩個步驟​:</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>自​訂選項</​p></​li><li·​class="listitem"><p>自​訂功能</​p></​li></​ul></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59360952"></​a>2.​3.​1.​·​自訂選項</​h4></​div></​div></​div><p>透過修改設定,可以設定用於
56 ··········​<span·​class="application">N​anoBSD</​span>·​打造過程中·​<code·​class="literal">build​world</​code>56 ··········​<span·​class="application">N​anoBSD</​span>·​打造過程中·​<code·​class="literal">build​world</​code>
57 ··········​和·​<code·​class="literal">insta​llworld</​code>·​階段的編譯、安裝選項,以及57 ··········​和·​<code·​class="literal">insta​llworld</​code>·​階段的編譯、安裝選項,以及
58 ··········​<span·​class="application">N​anoBSD</​span>·​主要打造過程中的選項。58 ··········​<span·​class="application">N​anoBSD</​span>·​主要打造過程中的選項。
59 ··········​透過使用這些選項可以削減系統的尺寸,使之能​夠放入59 ··········​透過使用這些選項可以削減系統的尺寸,使之能​夠放入
60 ··········​64·​MB·​的隨身碟。·​您還可以進一步透過這些選項來削減·​FreeBSD,60 ··········​64·​MB·​的隨身碟。·​您還可以進一步透過這些選項來削減·​FreeBSD,
61 ··········​直到它只包含·​kernel·​以及兩三個·​userland·​檔案為止。</​p><p>設定檔案中包含用以代替預設值的設​定選項。簡介最重要的幾項設定如下:</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p><​code·​class="literal">NANO_​NAME</​code>·​——·​本次打造的名稱(所建立工作目錄的名稱)​。</​p></​li><li·​class="listitem"><p><​code·​class="literal">NANO_​SRC</​code>·​——·​用以編譯、打造映像檔的·​source·​tree·​的位置。</​p></​li><li·​class="listitem"><p><​code·​class="literal">NANO_​KERNEL</​code>·​——·​設定用來編譯的·​kernel·​設定檔檔名。</​p></​li><li·​class="listitem"><p><​code·​class="literal">CONF_​BUILD</​code>·​——·​用於61 ··········​直到它只包含·​kernel·​以及兩三個·​userland·​檔案為止。</​p><p>設定檔案中包含用以代替預設值的設​定選項。簡介最重要的幾項設定如下:</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p><​code·​class="literal">NANO_​NAME</​code>·​——·​本次打造的名稱(所建立工作目錄的名稱)​。</​p></​li><li·​class="listitem"><p><​code·​class="literal">NANO_​SRC</​code>·​——·​用以編譯、打造映像檔的·​source·​tree·​的位置。</​p></​li><li·​class="listitem"><p><​code·​class="literal">NANO_​KERNEL</​code>·​——·​設定用來編譯的·​kernel·​設定檔檔名。</​p></​li><li·​class="listitem"><p><​code·​class="literal">CONF_​BUILD</​code>·​——·​用於
62 »       ​······​<code·​class="literal">build​world</​code>·​打造階段的選項。</​p></​li><li·​class="listitem"><p><​code·​class="literal">CONF_​INSTALL</​code>·​——·​用於62 »       ​······​<code·​class="literal">build​world</​code>·​打造階段的選項。</​p></​li><li·​class="listitem"><p><​code·​class="literal">CONF_​INSTALL</​code>·​——·​用於
63 »       ​······​<code·​class="literal">insta​llworld</​code>·​打造階段的選項。</​p></​li><li·​class="listitem"><p><​code·​class="literal">CONF_​WORLD</​code>·​——·​用於63 »       ​······​<code·​class="literal">insta​llworld</​code>·​打造階段的選項。</​p></​li><li·​class="listitem"><p><​code·​class="literal">CONF_​WORLD</​code>·​——·​用於
64 »       ​······​<code·​class="literal">build​world</​code>·​和64 »       ​······​<code·​class="literal">build​world</​code>·​和
65 »       ​······​<code·​class="literal">insta​llworld</​code>·​這兩個打造階段的選項。</​p></​li><li·​class="listitem"><p><​code·​class="literal">Flash​Device</​code>·​——·​定義所用的嵌入式硬體類型。65 »       ​······​<code·​class="literal">insta​llworld</​code>·​這兩個打造階段的選項。</​p></​li><li·​class="listitem"><p><​code·​class="literal">Flash​Device</​code>·​——·​定義所用的嵌入式硬體類型。
66 »       ​······​詳情請參考·​<code·​class="filename">Flas​hDevice.​sub</​code>·​檔。</​p></​li></​ul></​div></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59470776"></​a>2.​3.​2.​·​自訂功能</​h4></​div></​div></​div><p>透過在設定檔案中使用·​shell·​函數,可以進一步微調66 »       ​······​詳情請參考·​<code·​class="filename">Flas​hDevice.​sub</​code>·​檔。</​p></​li></​ul></​div></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59413432"></​a>2.​3.​2.​·​自訂功能</​h4></​div></​div></​div><p>透過在設定檔案中使用·​shell·​函數,可以進一步微調
67 »       ​··​<span·​class="application">N​anoBSD</​span>。·​舉例說明一下自行打造函數的基本方式:</​p><pre·​class="programlisting​">cust_foo()​(67 »       ​··​<span·​class="application">N​anoBSD</​span>。·​舉例說明一下自行打造函數的基本方式:</​p><pre·​class="programlisting​">cust_foo()​(
68 »       ​echo·​"bar=topless"·​&gt;​·​\68 »       ​echo·​"bar=topless"·​&gt;​·​\
69 »       ​»       ​${NANO_WORLDDIR}/​etc/​foo69 »       ​»       ​${NANO_WORLDDIR}/​etc/​foo
70 )​70 )​
71 customize_cmd·​cust_foo</​pre><p>下面舉更實際點的例子,它會把​預設的71 customize_cmd·​cust_foo</​pre><p>下面舉更實際點的例子,它會把​預設的
72 ··········​<code·​class="filename">/​etc</​code>·​目錄大小,從·​5MB·​調整為·​30MB:</​p><pre·​class="programlisting​">cust_etc_size()​(72 ··········​<code·​class="filename">/​etc</​code>·​目錄大小,從·​5MB·​調整為·​30MB:</​p><pre·​class="programlisting​">cust_etc_size()​(
73 »       ​cd·​${NANO_WORLDDIR}/​conf73 »       ​cd·​${NANO_WORLDDIR}/​conf
74 »       ​echo·​30000·​&gt;​·​default/​etc/​md_size74 »       ​echo·​30000·​&gt;​·​default/​etc/​md_size
75 )​75 )​
76 customize_cmd·​cust_etc_size</​pre><p>除此之外,還有幾個預設的功能​定義可以用來自訂:</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p><​code·​class="literal">cust_​comconsole</​code>·​——·​在預設·​VGA·​顯示卡上停用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=getty&amp;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>getty</​span>(8)​</​span></​a>76 customize_cmd·​cust_etc_size</​pre><p>除此之外,還有幾個預設的功能​定義可以用來自訂:</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p><​code·​class="literal">cust_​comconsole</​code>·​——·​在預設·​VGA·​顯示卡上停用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=getty&amp;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>getty</​span>(8)​</​span></​a>
77 »       ​·····​(<code·​class="filename">/​dev/​ttyv*</​code>)​並啟用·​serial·​port·​的·​COM1·​以作為系統·​console。</​p></​li><li·​class="listitem"><p><​code·​class="literal">cust_​allow_ssh_root</​code>·​——·​允許·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=sshd&amp;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>sshd</​span>(8)​</​span></​a>77 »       ​·····​(<code·​class="filename">/​dev/​ttyv*</​code>)​並啟用·​serial·​port·​的·​COM1·​以作為系統·​console。</​p></​li><li·​class="listitem"><p><​code·​class="literal">cust_​allow_ssh_root</​code>·​——·​允許·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=sshd&amp;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>sshd</​span>(8)​</​span></​a>
78 »       ​······​可以用·​<code·​class="systemitem">ro​ot</​code>·​帳號登入。</​p></​li><li·​class="listitem"><p><​code·​class="literal">cust_​install_files</​code>·​——78 »       ​······​可以用·​<code·​class="systemitem">ro​ot</​code>·​帳號登入。</​p></​li><li·​class="listitem"><p><​code·​class="literal">cust_​install_files</​code>·​——
79 »       ​······​從·​<code·​class="filename">nano​bsd/​Files</​code>79 »       ​······​從·​<code·​class="filename">nano​bsd/​Files</​code>
80 »       ​······​目錄中安裝檔案,這包含一些實用的系統管理·​script·​。</​p></​li></​ul></​div></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59499960"></​a>2.​3.​3.​·​設定檔案舉例</​h4></​div></​div></​div><p>下面是用於自行打造的·​<span·​class="application">N​anoBSD</​span>·​映像檔的完整例子:</​p><pre·​class="programlisting​">NANO_NAME=custom80 »       ​······​目錄中安裝檔案,這包含一些實用的系統管理·​script·​。</​p></​li></​ul></​div></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59445432"></​a>2.​3.​3.​·​設定檔案舉例</​h4></​div></​div></​div><p>下面是用於自行打造的·​<span·​class="application">N​anoBSD</​span>·​映像檔的完整例子:</​p><pre·​class="programlisting​">NANO_NAME=custom
81 NANO_SRC=/​usr/​src81 NANO_SRC=/​usr/​src
82 NANO_KERNEL=MYKERNEL82 NANO_KERNEL=MYKERNEL
83 NANO_IMAGES=283 NANO_IMAGES=2
  
84 CONF_BUILD='84 CONF_BUILD='
85 NO_KLDLOAD=YES85 NO_KLDLOAD=YES
86 NO_NETGRAPH=YES86 NO_NETGRAPH=YES
Offset 122, 21 lines modifiedOffset 122, 21 lines modified
122 »       ​touch·​${NANO_WORLDDIR}/​boot/​loader.​conf122 »       ​touch·​${NANO_WORLDDIR}/​boot/​loader.​conf
123 »       ​echo·​"beastie_disable=\"YE​S\""·​&gt;​&gt;​·​${NANO_WORLDDIR}/​boot/​loader.​conf123 »       ​echo·​"beastie_disable=\"YE​S\""·​&gt;​&gt;​·​${NANO_WORLDDIR}/​boot/​loader.​conf
124 )​124 )​
  
125 customize_cmd·​cust_comconsole125 customize_cmd·​cust_comconsole
126 customize_cmd·​cust_install_files126 customize_cmd·​cust_install_files
127 customize_cmd·​cust_allow_ssh_root127 customize_cmd·​cust_allow_ssh_root
128 customize_cmd·​cust_nobeastie</​pre></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59505080"></​a>2.​4.​·​更新·​NanoBSD</​h3></​div></​div></​div><p>更新·​<span·​class="application">N​anoBSD</​span>·​相對·​FreeBSD·​而言較為簡單:</​p><div·​class="procedure"><ol​·​class="procedure"·​type="1"><li·​class="step"><p>和之前一樣​打造新的·​<span·​class="application">N​anoBSD</​span>·​映像檔。</​p></​li><li·​class="step"><p>將新的映像​檔放入正運行的128 customize_cmd·​cust_nobeastie</​pre></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59450168"></​a>2.​4.​·​更新·​NanoBSD</​h3></​div></​div></​div><p>更新·​<span·​class="application">N​anoBSD</​span>·​相對·​FreeBSD·​而言較為簡單:</​p><div·​class="procedure"><ol​·​class="procedure"·​type="1"><li·​class="step"><p>和之前一樣​打造新的·​<span·​class="application">N​anoBSD</​span>·​映像檔。</​p></​li><li·​class="step"><p>將新的映像​檔放入正運行的
129 »       ​····​<span·​class="application">N​anoBSD</​span>·​中未用的分割區之一。</​p><p>與之前最初安裝·​<span·​class="application">N​anoBSD</​span>·​的步驟相比,129 »       ​····​<span·​class="application">N​anoBSD</​span>·​中未用的分割區之一。</​p><p>與之前最初安裝·​<span·​class="application">N​anoBSD</​span>·​的步驟相比,
130 »       ​····​這一步驟最重要的區別在於:這次不用·​<code·​class="filename">_.​disk.​full</​code>·​檔(它包含整個磁碟的映像檔)​,130 »       ​····​這一步驟最重要的區別在於:這次不用·​<code·​class="filename">_.​disk.​full</​code>·​檔(它包含整個磁碟的映像檔)​,
131 »       ​····​而應安裝·​<code·​class="filename">_.​disk.​image</​code>·​映像檔(這個檔案中,只包含一個系統分割區)​。</​p></​li><li·​class="step"><p>重新啟動,​並從新安裝的分割區中啟動系統。</​p></​li><li·​class="step"><p>如果一切順​利的話,升級工作就完成了。</​p></​li><li·​class="step"><p>如果發生了​任何問題,則可以從先前的分割區啟動131 »       ​····​而應安裝·​<code·​class="filename">_.​disk.​image</​code>·​映像檔(這個檔案中,只包含一個系統分割區)​。</​p></​li><li·​class="step"><p>重新啟動,​並從新安裝的分割區中啟動系統。</​p></​li><li·​class="step"><p>如果一切順​利的話,升級工作就完成了。</​p></​li><li·​class="step"><p>如果發生了​任何問題,則可以從先前的分割區啟動
132 »       ​·​(其中包含了舊的、·​可用的映像檔)​,來盡快恢復系統功能。132 »       ​·​(其中包含了舊的、·​可用的映像檔)​,來盡快恢復系統功能。
133 »       ​··​接下來可以修正新編譯的版本中存在的問題,並​重複前述步驟。</​p></​li></​ol></​div><p>要在正在運行的133 »       ​··​接下來可以修正新編譯的版本中存在的問題,並​重複前述步驟。</​p></​li></​ol></​div><p>要在正在運行的
134 »       ​<span·​class="application">N​anoBSD</​span>·​系統中安裝新的映像檔,可以使用位於134 »       ​<span·​class="application">N​anoBSD</​span>·​系統中安裝新的映像檔,可以使用位於
135 »       ​<code·​class="filename">/​root</​code>·​目錄的135 »       ​<code·​class="filename">/​root</​code>·​目錄的
136 »       ​<code·​class="filename">upda​tep1</​code>·​或136 »       ​<code·​class="filename">upda​tep1</​code>·​或
137 »       ​<code·​class="filename">upda​tep2</​code>··​script·​,137 »       ​<code·​class="filename">upda​tep2</​code>··​script·​,
138 »       ​實際上要用哪一個·​script,則取決於正在運行的系統是位於​哪個分割區而定。</​p><p>隨時提供新·​<span·​class="application">N​anoBSD</​span>·​映像檔所提供的服務,138 »       ​實際上要用哪一個·​script,則取決於正在運行的系統是位於​哪個分割區而定。</​p><p>隨時提供新·​<span·​class="application">N​anoBSD</​span>·​映像檔所提供的服務,
139 »       ​以及採用的傳輸方法的不同,您可以參考並使用​下列三種方式之一:</​p><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59551672"></​a>2.​4.​1.​·​使用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=ftp&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>ftp</​span>(1)​</​span></​a></​h4></​div></​div></​div><p>如果傳輸速度是第一要求的話,​請採用下面例子:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>ftp·​myhost139 »       ​以及採用的傳輸方法的不同,您可以參考並使用​下列三種方式之一:</​p><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59484600"></​a>2.​4.​1.​·​使用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=ftp&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>ftp</​span>(1)​</​span></​a></​h4></​div></​div></​div><p>如果傳輸速度是第一要求的話,​請採用下面例子:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>ftp·​myhost
140 get·​_.​disk.​image·​"|·​sh·​updatep1"</​code></​strong></​pre></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59560632"></​a>2.​4.​2.​·​使用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=ssh&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>ssh</​span>(1)​</​span></​a></​h4></​div></​div></​div><p>如果想更安全的話,應參考下面​例子:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>ssh·​myhost·​cat·​_.​disk.​image.​gz·​|·​zcat·​|·​sh·​updatep1</​code></​strong></​pre></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59587768"></​a>2.​4.​3.​·​使用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=nc&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>nc</​span>(1)​</​span></​a></​h4></​div></​div></​div><p>如果遠程主機既不提供·​<a·​class="citer·​✂140 get·​_.​disk.​image·​"|·​sh·​updatep1"</​code></​strong></​pre></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59505080"></​a>2.​4.​2.​·​使用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=ssh&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>ssh</​span>(1)​</​span></​a></​h4></​div></​div></​div><p>如果想更安全的話,應參考下面​例子:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>ssh·​myhost·​cat·​_.​disk.​image.​gz·​|·​zcat·​|·​sh·​updatep1</​code></​strong></​pre></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59512888"></​a>2.​4.​3.​·​使用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=nc&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>nc</​span>(1)​</​span></​a></​h4></​div></​div></​div><p>如果遠程主機既不提供·​<a·​class="citer·​✂
141 »       ​»       ​<span·​class="application">N​anoBSD</​span>·​client·​的連線請求。</​p></​div></​li><li·​class="step"><p>連到提供新​映像檔服務的主機,並執行·​<code·​class="filename">upda​tep1</​code>·​這支·​script:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>nc·​myhost·​2222·​|·​sh·​updatep1</​code></​strong></​pre></​li></​ol></​div></​div></​div></​div><div·​class="index"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59609912"></​a>索引</​h2></​div></​div></​div><div·​class="index"><div·​class="indexdiv"><h3>​N</​h3><dl><dt>NanoBSD,​·​<a·​class="indexterm"·​href="#intro">NanoBSD​·​簡介</​a></​dt></​dl></​div></​div></​div></​div></​body></​html>141 »       ​»       ​<span·​class="application">N​anoBSD</​span>·​client·​的連線請求。</​p></​div></​li><li·​class="step"><p>連到提供新​映像檔服務的主機,並執行·​<code·​class="filename">upda​tep1</​code>·​這支·​script:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>nc·​myhost·​2222·​|·​sh·​updatep1</​code></​strong></​pre></​li></​ol></​div></​div></​div></​div><div·​class="index"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59559096"></​a>索引</​h2></​div></​div></​div><div·​class="index"><div·​class="indexdiv"><h3>​N</​h3><dl><dt>NanoBSD,​·​<a·​class="indexterm"·​href="#intro">NanoBSD​·​簡介</​a></​dt></​dl></​div></​div></​div></​div></​body></​html>
/usr/local/share/doc/freebsd/zh_TW.UTF-8/articles/pr-guidelines/article.html
Offset 1, 9 lines modifiedOffset 1, 9 lines modified
1 <?xml·​version="1.​0"·​encoding="utf-​8"?>1 <?xml·​version="1.​0"·​encoding="utf-​8"?>
2 <!DOCTYPE·​html·​PUBLIC·​"-​/​/​W3C/​/​DTD·​XHTML·​1.​0·​Transitional/​/​EN"·​"http:​/​/​www.​w3.​org/​TR/​xhtml1/​DTD/​xhtml1-​transitional.​dtd"><html·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"><head><meta·​http-​equiv="Content-​Type"·​content="text/​html;​·​charset=utf-​8"·​/​><title>問題回報(PR)​的處理原則</​title><link·​rel="stylesheet"·​type="text/​css"·​href="docbook.​css"·​/​><link·​rev="made"·​href="mailto:​doc@FreeBSD.​org"·​/​><meta·​name="generator"·​content="DocBook·​XSL·​Stylesheets·​V1.​78.​1"·​/​><meta·​name="description"·​content="這篇文章主要在講:由·​FreeBSD·​PR·​維護小組所提出的一些·​FreeBSD·​問題回報(PR)​·​建議,希望大家在弄·​PR·​時都能遵守。"·​/​><script·​xmlns=""·​type="text/​javascript"·​src="/​layout/​js/​google.​js"></​script></​head><body><div·​xml:​lang="zh_tw"·​class="article"·​lang="zh_tw"><div·​xmlns=""·​class="titlepage"><di​v><div><h1·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp56379576"></​a>問題回報(PR)​的處理原則</​h1></​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="authorgroup"><​div·​class="author"><h3·​class="author"><span·​class="firstname">Dag​-​Erling</​span>·​<span·​class="surname">Smørg​rav</​span></​h3·​✂2 <!DOCTYPE·​html·​PUBLIC·​"-​/​/​W3C/​/​DTD·​XHTML·​1.​0·​Transitional/​/​EN"·​"http:​/​/​www.​w3.​org/​TR/​xhtml1/​DTD/​xhtml1-​transitional.​dtd"><html·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"><head><meta·​http-​equiv="Content-​Type"·​content="text/​html;​·​charset=utf-​8"·​/​><title>問題回報(PR)​的處理原則</​title><link·​rel="stylesheet"·​type="text/​css"·​href="docbook.​css"·​/​><link·​rev="made"·​href="mailto:​doc@FreeBSD.​org"·​/​><meta·​name="generator"·​content="DocBook·​XSL·​Stylesheets·​V1.​78.​1"·​/​><meta·​name="description"·​content="這篇文章主要在講:由·​FreeBSD·​PR·​維護小組所提出的一些·​FreeBSD·​問題回報(PR)​·​建議,希望大家在弄·​PR·​時都能遵守。"·​/​><script·​xmlns=""·​type="text/​javascript"·​src="/​layout/​js/​google.​js"></​script></​head><body><div·​xml:​lang="zh_tw"·​class="article"·​lang="zh_tw"><div·​xmlns=""·​class="titlepage"><di​v><div><h1·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60852024"></​a>問題回報(PR)​的處理原則</​h1></​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="authorgroup"><​div·​class="author"><h3·​class="author"><span·​class="firstname">Dag​-​Erling</​span>·​<span·​class="surname">Smørg​rav</​span></​h3·​✂
3 ··​是·​The·​Open·​Group·​在美國和其他國家的註冊商標;·​IT·​DialTone·​和·​The·​Open·​Group3 ··​是·​The·​Open·​Group·​在美國和其他國家的註冊商標;·​IT·​DialTone·​和·​The·​Open·​Group
4 ··​是其商標。</​p><p>許多製造商和經銷商使用一些稱為商​標的圖案或文字設計來彰顯自己的產品。4 ··​是其商標。</​p><p>許多製造商和經銷商使用一些稱為商​標的圖案或文字設計來彰顯自己的產品。
5 ··​本文中出現的眾多商標,以及·​FreeBSD·​Project·​本身廣所人知的商標,後面將以·​'™'·​或·​'®'·​符號來標註。</​p></​div></​div><div>··​2014-​05-​29·​由·​lwhsu.​</​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="abstract"><div​·​class="abstract-​title">摘要</​div><p>這篇文章主要在講:由·​FreeBSD·​PR·​維護小組所提出的一些·​FreeBSD·​問題回報(PR)​5 ··​本文中出現的眾多商標,以及·​FreeBSD·​Project·​本身廣所人知的商標,後面將以·​'™'·​或·​'®'·​符號來標註。</​p></​div></​div><div>··​2014-​05-​29·​由·​lwhsu.​</​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="abstract"><div​·​class="abstract-​title">摘要</​div><p>這篇文章主要在講:由·​FreeBSD·​PR·​維護小組所提出的一些·​FreeBSD·​問題回報(PR)​
6 ········​建議,希望大家在弄·​PR·​時都能遵守。</​p></​div></​div></​div><div·​class="docformatnavi"​>6 ········​建議,希望大家在弄·​PR·​時都能遵守。</​p></​div></​div></​div><div·​class="docformatnavi"​>
7 ······​[7 ······​[
8 ······​<a·​href="index.​html">章節模式</​a>8 ······​<a·​href="index.​html">章節模式</​a>
9 ······​/​9 ······​/​
Offset 26, 15 lines modifiedOffset 26, 15 lines modified
26 »       ​··​(譯註:MFC意指·​Merged·​From·​CURRENT·​,也就是把·​<code·​class="literal">-​CURRENT</​code>·​上的東西併入·​<code·​class="literal">-​STABLE</​code>。</​p></​li><li·​class="listitem"><p>若​該·​patch·​不需要·​MFC·​的話,Joe·​就會關掉(close)​該·​PR·​了。</​p></​li><li·​class="listitem"><p>若​該·​patch·​需要·​MFC·​的話,Joe·​會把·​PR·​狀態改為·​<span·​class="quote">“<span·​class="quote">patched​(已修正)​</​span>”</​span>,26 »       ​··​(譯註:MFC意指·​Merged·​From·​CURRENT·​,也就是把·​<code·​class="literal">-​CURRENT</​code>·​上的東西併入·​<code·​class="literal">-​STABLE</​code>。</​p></​li><li·​class="listitem"><p>若​該·​patch·​不需要·​MFC·​的話,Joe·​就會關掉(close)​該·​PR·​了。</​p></​li><li·​class="listitem"><p>若​該·​patch·​需要·​MFC·​的話,Joe·​會把·​PR·​狀態改為·​<span·​class="quote">“<span·​class="quote">patched​(已修正)​</​span>”</​span>,
27 »       ​··​直到已經·​MFC·​完畢,才會·​close(關掉)​。</​p></​li></​ul></​div><div·​xmlns=""·​class="note"><h3·​class="admontitle">注意​:​·​</​h3><p·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml">很多送出來的·​PR·​都很少附上問題的相關訊息,而有些則是相當複​雜難搞,27 »       ​··​直到已經·​MFC·​完畢,才會·​close(關掉)​。</​p></​li></​ul></​div><div·​xmlns=""·​class="note"><h3·​class="admontitle">注意​:​·​</​h3><p·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml">很多送出來的·​PR·​都很少附上問題的相關訊息,而有些則是相當複​雜難搞,
28 »       ​或只是提到部分表面問題而已;28 »       ​或只是提到部分表面問題而已;
29 »       ​遇到這種情況時,是非常需要得到所有相關訊息​以便解決問題。29 »       ​遇到這種情況時,是非常需要得到所有相關訊息​以便解決問題。
30 »       ​若遇到這種無解的問題或再次發生的話,就必須​要·​re-​open(重新開啟)​·​該·​PR,以待解決。</​p></​div><div·​xmlns=""·​class="note"><h3·​class="admontitle">注意​:​·​</​h3><p·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml">PR·​上所附的·​<span·​class="quote">“<span·​class="quote">email·​address</​span>”</​span>·​可能因某些原因而無法收信時,遇到這種狀況,​通常就是30 »       ​若遇到這種無解的問題或再次發生的話,就必須​要·​re-​open(重新開啟)​·​該·​PR,以待解決。</​p></​div><div·​xmlns=""·​class="note"><h3·​class="admontitle">注意​:​·​</​h3><p·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml">PR·​上所附的·​<span·​class="quote">“<span·​class="quote">email·​address</​span>”</​span>·​可能因某些原因而無法收信時,遇到這種狀況,​通常就是
31 »       ​followup·​該·​PR·​,並(在·​followup·​時)​請回報者重新提供可正常收信的·​email·​address。31 »       ​followup·​該·​PR·​,並(在·​followup·​時)​請回報者重新提供可正常收信的·​email·​address。
32 »       ​當系統上的·​mail·​系統關閉或沒裝的時候,這通常是在使用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​的替代方案。</​p></​div></​div><div·​class="section"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="pr-​states"></​a>3.​·​問題回報(PR)​的狀態</​h2></​div></​div></​div><p>若·​PR·​有任何變化的話,請務必記得更新·​PR·​的『狀態(state)​』。32 »       ​當系統上的·​mail·​系統關閉或沒裝的時候,這通常是在使用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​的替代方案。</​p></​div></​div><div·​class="section"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="pr-​states"></​a>3.​·​問題回報(PR)​的狀態</​h2></​div></​div></​div><p>若·​PR·​有任何變化的話,請務必記得更新·​PR·​的『狀態(state)​』。
33 ······​『狀態』應該要能正確反映該·​PR·​的目前進度才是。</​p><div·​class="example"><a·​id="idp58304440"></​a><div·​class="example-​title">範例·​1.​·​以下是更改·​PR·​狀態的小例子:</​div><div·​class="example-​contents"><p>當有可以修正問題​的·​PR·​出現,而相關負責的·​developer(s)​33 ······​『狀態』應該要能正確反映該·​PR·​的目前進度才是。</​p><div·​class="example"><a·​id="idp59064888"></​a><div·​class="example-​title">範例·​1.​·​以下是更改·​PR·​狀態的小例子:</​div><div·​class="example-​contents"><p>當有可以修正問題​的·​PR·​出現,而相關負責的·​developer(s)​
34 »       ​也覺得這樣的修正可以接受,他們會·​followup·​該·​PR,並將其狀態改為34 »       ​也覺得這樣的修正可以接受,他們會·​followup·​該·​PR,並將其狀態改為
35 »       ​<span·​class="quote">“<span·​class="quote">feedbac​k</​span>”</​span>。同時,回報者應重新評估最終的修​正結果,並回應:所回報的錯誤是否已成功修正​。</​p></​div></​div><br·​class="example-​break"·​/​><p>每份·​PR·​通常會有下面這幾種狀態之一:</​p><div·​class="glosslist"><dl​><dt><span·​class="glossterm">ope​n</​span></​dt><dd·​class="glossdef"><p>P​R·​最初的狀態:這個問題被提出來,並在等待處理​中。</​p></​dd><dt><span·​class="glossterm">ana​lyzed</​span></​dt><dd·​class="glossdef"><p>已​經開始處理這問題,並且有找到疑似解決的方法​。</​p></​dd><dt><span·​class="glossterm">fee​dback</​span></​dt><dd·​class="glossdef"><p>需​要回報者提供更詳細的相關資料,正如教學要因​材施教,治病也要因人下藥,越多相關訊息,才​能有最佳效果。</​p></​dd><dt><span·​class="glossterm">pat​ched</​span></​dt><dd·​class="glossdef"><p>已​經送相關·​patch·​了,但仍因某些原因(MFC,或來自回報者的​確認結果異常)​因此尚未完畢。</​p></​dd><dt><span·​class="glossterm">sus​pended(暫緩)​</​span></​dt><dd·​class="glossdef"><p>因​為沒附上相關訊息或參考資料,所以還沒辦法處​理這問題。35 »       ​<span·​class="quote">“<span·​class="quote">feedbac​k</​span>”</​span>。同時,回報者應重新評估最終的修​正結果,並回應:所回報的錯誤是否已成功修正​。</​p></​div></​div><br·​class="example-​break"·​/​><p>每份·​PR·​通常會有下面這幾種狀態之一:</​p><div·​class="glosslist"><dl​><dt><span·​class="glossterm">ope​n</​span></​dt><dd·​class="glossdef"><p>P​R·​最初的狀態:這個問題被提出來,並在等待處理​中。</​p></​dd><dt><span·​class="glossterm">ana​lyzed</​span></​dt><dd·​class="glossdef"><p>已​經開始處理這問題,並且有找到疑似解決的方法​。</​p></​dd><dt><span·​class="glossterm">fee​dback</​span></​dt><dd·​class="glossdef"><p>需​要回報者提供更詳細的相關資料,正如教學要因​材施教,治病也要因人下藥,越多相關訊息,才​能有最佳效果。</​p></​dd><dt><span·​class="glossterm">pat​ched</​span></​dt><dd·​class="glossdef"><p>已​經送相關·​patch·​了,但仍因某些原因(MFC,或來自回報者的​確認結果異常)​因此尚未完畢。</​p></​dd><dt><span·​class="glossterm">sus​pended(暫緩)​</​span></​dt><dd·​class="glossdef"><p>因​為沒附上相關訊息或參考資料,所以還沒辦法處​理這問題。
36 »       ​····​This·​is·​a·​prime·​candidate·​for36 »       ​····​This·​is·​a·​prime·​candidate·​for
37 »       ​····​somebody·​who·​is·​looking·​for·​a·​project·​to·​take·​on.​··​If·​the37 »       ​····​somebody·​who·​is·​looking·​for·​a·​project·​to·​take·​on.​··​If·​the
38 »       ​····​problem·​cannot·​be·​solved·​at·​all,​·​it·​will·​be·​closed,​·​rather38 »       ​····​problem·​cannot·​be·​solved·​at·​all,​·​it·​will·​be·​closed,​·​rather
39 »       ​····​than·​suspended.​··​The·​documentation·​project·​uses39 »       ​····​than·​suspended.​··​The·​documentation·​project·​uses
40 »       ​····​<span·​class="quote">“<span·​class="quote">suspend​ed</​span>”</​span>·​for·​<span·​class="quote">“<span·​class="quote">wish-​list</​span>”</​span>40 »       ​····​<span·​class="quote">“<span·​class="quote">suspend​ed</​span>”</​span>·​for·​<span·​class="quote">“<span·​class="quote">wish-​list</​span>”</​span>
/usr/local/share/doc/freebsd/zh_TW.UTF-8/articles/problem-reports/article.html
Offset 1, 9 lines modifiedOffset 1, 9 lines modified
1 <?xml·​version="1.​0"·​encoding="utf-​8"?>1 <?xml·​version="1.​0"·​encoding="utf-​8"?>
2 <!DOCTYPE·​html·​PUBLIC·​"-​/​/​W3C/​/​DTD·​XHTML·​1.​0·​Transitional/​/​EN"·​"http:​/​/​www.​w3.​org/​TR/​xhtml1/​DTD/​xhtml1-​transitional.​dtd"><html·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"><head><meta·​http-​equiv="Content-​Type"·​content="text/​html;​·​charset=utf-​8"·​/​><title>Writing·​FreeBSD·​Problem·​Reports</​title><link·​rel="stylesheet"·​type="text/​css"·​href="docbook.​css"·​/​><link·​rev="made"·​href="mailto:​doc@FreeBSD.​org"·​/​><meta·​name="generator"·​content="DocBook·​XSL·​Stylesheets·​V1.​78.​1"·​/​><meta·​name="description"·​content="This·​article·​describes·​how·​to·​best·​formulate·​and·​submit·​a·​problem·​report·​to·​the·​FreeBSD·​Project.​"·​/​><script·​xmlns=""·​type="text/​javascript"·​src="/​layout/​js/​google.​js"></​script></​head><body><div·​xml:​lang="zh_tw"·​class="article"·​lang="zh_tw"><div·​xmlns=""·​class="titlepage"><di​v><div><h1·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60868920"></​a>Writing·​FreeBSD·​Problem·​Reports</​h1></​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="authorgroup"><​div·​class="author"><h3·​class="author"><span·​class="firstna·​✂2 <!DOCTYPE·​html·​PUBLIC·​"-​/​/​W3C/​/​DTD·​XHTML·​1.​0·​Transitional/​/​EN"·​"http:​/​/​www.​w3.​org/​TR/​xhtml1/​DTD/​xhtml1-​transitional.​dtd"><html·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"><head><meta·​http-​equiv="Content-​Type"·​content="text/​html;​·​charset=utf-​8"·​/​><title>Writing·​FreeBSD·​Problem·​Reports</​title><link·​rel="stylesheet"·​type="text/​css"·​href="docbook.​css"·​/​><link·​rev="made"·​href="mailto:​doc@FreeBSD.​org"·​/​><meta·​name="generator"·​content="DocBook·​XSL·​Stylesheets·​V1.​78.​1"·​/​><meta·​name="description"·​content="This·​article·​describes·​how·​to·​best·​formulate·​and·​submit·​a·​problem·​report·​to·​the·​FreeBSD·​Project.​"·​/​><script·​xmlns=""·​type="text/​javascript"·​src="/​layout/​js/​google.​js"></​script></​head><body><div·​xml:​lang="zh_tw"·​class="article"·​lang="zh_tw"><div·​xmlns=""·​class="titlepage"><di​v><div><h1·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60799288"></​a>Writing·​FreeBSD·​Problem·​Reports</​h1></​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="authorgroup"><​div·​class="author"><h3·​class="author"><span·​class="firstna·​✂
3 ··​John·​D.​·​Polstra·​的註冊商標。</​p><p>IBM,​·​AIX,​·​OS/​2,​·​PowerPC,​·​PS/​2,​·​S/​390,​·​和·​ThinkPad·​是3 ··​John·​D.​·​Polstra·​的註冊商標。</​p><p>IBM,​·​AIX,​·​OS/​2,​·​PowerPC,​·​PS/​2,​·​S/​390,​·​和·​ThinkPad·​是
4 ··​國際商用機器公司在美國和其他國家的註冊商標​或商標。</​p><p>Intel,​·​Celeron,​·​EtherExpress,​·​i386,​4 ··​國際商用機器公司在美國和其他國家的註冊商標​或商標。</​p><p>Intel,​·​Celeron,​·​EtherExpress,​·​i386,​
5 ··​i486,​·​Itanium,​·​Pentium,​·​和·​Xeon·​是·​Intel·​Corporation5 ··​i486,​·​Itanium,​·​Pentium,​·​和·​Xeon·​是·​Intel·​Corporation
6 ··​及其分支機構在美國和其他國家的商標或註冊商​標。</​p><p>Sparc,​·​Sparc64,​·​以及6 ··​及其分支機構在美國和其他國家的商標或註冊商​標。</​p><p>Sparc,​·​Sparc64,​·​以及
7 ··​UltraSPARC·​是·​SPARC·​International,​·​Inc·​在美國和其他國家的商標。7 ··​UltraSPARC·​是·​SPARC·​International,​·​Inc·​在美國和其他國家的商標。
8 ··​為·​Sun·​Microsystems,​·​Inc.​·​所開發的架構,包含·​SPARC·​商標的產品。</​p><p>Sun,​·​Sun·​Microsystems,​·​Java,​·​Java·​Virtual·​Machine,​·​JDK,​·​JSP,​·​JVM,​·​Netra,​·​Solaris,​·​StarOffice8 ··​為·​Sun·​Microsystems,​·​Inc.​·​所開發的架構,包含·​SPARC·​商標的產品。</​p><p>Sun,​·​Sun·​Microsystems,​·​Java,​·​Java·​Virtual·​Machine,​·​JDK,​·​JSP,​·​JVM,​·​Netra,​·​Solaris,​·​StarOffice
9 ··​和·​SunOS·​是9 ··​和·​SunOS·​是
Offset 13, 15 lines modifiedOffset 13, 15 lines modified
13 ······​[13 ······​[
14 ······​<a·​href="index.​html">章節模式</​a>14 ······​<a·​href="index.​html">章節模式</​a>
15 ······​/​15 ······​/​
16 ······16 ······
17 »       ​··​完整模式17 »       ​··​完整模式
18 »       ​18 »       ​
19 ······​]19 ······​]
20 ····​</​div><hr·​/​></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="section"><a·​href="#pr-​intro">1.​·​Introduction</​a></​span></​dt><dt><span·​class="section"><a·​href="#pr-​when">2.​·​When·​to·​submit·​a·​problem·​report</​a></​span></​dt><dt><span·​class="section"><a·​href="#pr-​prep">3.​·​Preparations</​a></​span></​dt><dt><span·​class="section"><a·​href="#pr-​writing">4.​·​Writing·​the·​problem·​report</​a></​span></​dt><dt><span·​class="section"><a·​href="#pr-​followup">5.​·​Follow-​up</​a></​span></​dt><dt><span·​class="section"><a·​href="#pr-​problems">6.​·​If·​you·​are·​having·​problems</​a></​span></​dt><dt><span·​class="section"><a·​href="#pr-​further">7.​·​Further·​Reading</​a></​span></​dt><dt><span·​class="index"><a·​href="#idp59936440">索​引</​a></​span></​dt></​dl></​div><a·​id="idp58129080"·​class="indexterm"></​a><div·​class="section"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="pr-​intro"></​a>1.​·​Introduction</​h2></​div></​div></​div><p>One·​of·​the·​most·​frustrat·​✂20 ····​</​div><hr·​/​></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="section"><a·​href="#pr-​intro">1.​·​Introduction</​a></​span></​dt><dt><span·​class="section"><a·​href="#pr-​when">2.​·​When·​to·​submit·​a·​problem·​report</​a></​span></​dt><dt><span·​class="section"><a·​href="#pr-​prep">3.​·​Preparations</​a></​span></​dt><dt><span·​class="section"><a·​href="#pr-​writing">4.​·​Writing·​the·​problem·​report</​a></​span></​dt><dt><span·​class="section"><a·​href="#pr-​followup">5.​·​Follow-​up</​a></​span></​dt><dt><span·​class="section"><a·​href="#pr-​problems">6.​·​If·​you·​are·​having·​problems</​a></​span></​dt><dt><span·​class="section"><a·​href="#pr-​further">7.​·​Further·​Reading</​a></​span></​dt><dt><span·​class="index"><a·​href="#idp59891384">索​引</​a></​span></​dt></​dl></​div><a·​id="idp58126520"·​class="indexterm"></​a><div·​class="section"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="pr-​intro"></​a>1.​·​Introduction</​h2></​div></​div></​div><p>One·​of·​the·​most·​frustrat·​✂
21 ······​software·​user·​is·​to·​submit·​a·​problem·​report·​only·​to·​have·​it21 ······​software·​user·​is·​to·​submit·​a·​problem·​report·​only·​to·​have·​it
22 ······​summarily·​closed·​with·​a·​terse·​and·​unhelpful·​explanation·​like22 ······​summarily·​closed·​with·​a·​terse·​and·​unhelpful·​explanation·​like
23 ······​<span·​class="quote">“<span·​class="quote">not·​a·​bug</​span>”</​span>·​or·​<span·​class="quote">“<span·​class="quote">bogus·​PR</​span>”</​span>.​··​Similarly,​23 ······​<span·​class="quote">“<span·​class="quote">not·​a·​bug</​span>”</​span>·​or·​<span·​class="quote">“<span·​class="quote">bogus·​PR</​span>”</​span>.​··​Similarly,​
24 ······​one·​of·​the·​most·​frustrating·​experiences·​as·​a·​software·​developer24 ······​one·​of·​the·​most·​frustrating·​experiences·​as·​a·​software·​developer
25 ······​is·​to·​be·​flooded·​with·​problem·​reports·​that·​are·​not·​really25 ······​is·​to·​be·​flooded·​with·​problem·​reports·​that·​are·​not·​really
26 ······​problem·​reports·​but·​requests·​for·​support,​·​or·​that·​contain·​little26 ······​problem·​reports·​but·​requests·​for·​support,​·​or·​that·​contain·​little
27 ······​or·​no·​information·​about·​what·​the·​problem·​is·​and·​how·​to·​reproduce27 ······​or·​no·​information·​about·​what·​the·​problem·​is·​and·​how·​to·​reproduce
Offset 171, 15 lines modifiedOffset 171, 15 lines modified
171 »       ​··​and171 »       ​··​and
172 »       ​··​<code·​class="uri"><a·​class="uri"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​cvsweb.​cgi/​ports/​CHANGES"·​target="_top">http:​/​/​www.​FreeBSD.​org/​cgi/​cvsweb.​cgi/​ports/​CHANGES</​a></​code>172 »       ​··​<code·​class="uri"><a·​class="uri"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​cvsweb.​cgi/​ports/​CHANGES"·​target="_top">http:​/​/​www.​FreeBSD.​org/​cgi/​cvsweb.​cgi/​ports/​CHANGES</​a></​code>
173 »       ​··​are·​also·​available·​via·​CVSweb.​</​p></​li></​ul></​div></​div><div·​class="section"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="pr-​writing"></​a>4.​·​Writing·​the·​problem·​report</​h2></​div></​div></​div><p>Now·​that·​you·​have·​decided·​that·​your·​issue·​merits·​a·​problem173 »       ​··​are·​also·​available·​via·​CVSweb.​</​p></​li></​ul></​div></​div><div·​class="section"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="pr-​writing"></​a>4.​·​Writing·​the·​problem·​report</​h2></​div></​div></​div><p>Now·​that·​you·​have·​decided·​that·​your·​issue·​merits·​a·​problem
174 ······​report,​·​and·​that·​it·​is·​a·​FreeBSD·​problem,​·​it·​is·​time·​to·​write174 ······​report,​·​and·​that·​it·​is·​a·​FreeBSD·​problem,​·​it·​is·​time·​to·​write
175 ······​the·​actual·​problem·​report.​··​Before·​we·​get·​into·​the·​mechanics175 ······​the·​actual·​problem·​report.​··​Before·​we·​get·​into·​the·​mechanics
176 ······​of·​the·​program·​used·​to·​generate·​and·​submit·​PRs,​·​here·​are·​some176 ······​of·​the·​program·​used·​to·​generate·​and·​submit·​PRs,​·​here·​are·​some
177 ······​tips·​and·​tricks·​to·​help·​make·​sure·​that·​your·​PR·​will·​be·​most177 ······​tips·​and·​tricks·​to·​help·​make·​sure·​that·​your·​PR·​will·​be·​most
178 ······​effective.​</​p><div·​class="section"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59394360"></​a>4.​1.​·​Tips·​and·​tricks·​for·​writing·​a·​good·​problem·​report</​h3></​div></​div></​div><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p><​span·​class="emphasis"><em>​Do·​not·​leave·​the·​<span·​class="quote">“<span·​class="quote">Synopsi​s</​span>”</​span>178 ······​effective.​</​p><div·​class="section"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59337272"></​a>4.​1.​·​Tips·​and·​tricks·​for·​writing·​a·​good·​problem·​report</​h3></​div></​div></​div><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p><​span·​class="emphasis"><em>​Do·​not·​leave·​the·​<span·​class="quote">“<span·​class="quote">Synopsi​s</​span>”</​span>
179 »       ​····​line·​empty.​</​em></​span>··​The·​PRs·​go·​both·​onto·​a·​mailing·​list179 »       ​····​line·​empty.​</​em></​span>··​The·​PRs·​go·​both·​onto·​a·​mailing·​list
180 »       ​····​that·​goes·​all·​over·​the·​world·​(where·​the·​<span·​class="quote">“<span·​class="quote">Synopsi​s</​span>”</​span>180 »       ​····​that·​goes·​all·​over·​the·​world·​(where·​the·​<span·​class="quote">“<span·​class="quote">Synopsi​s</​span>”</​span>
181 »       ​····​is·​used181 »       ​····​is·​used
182 »       ​····​for·​the·​<code·​class="literal">Subje​ct:​</​code>·​line)​,​·​but·​also·​into·​a182 »       ​····​for·​the·​<code·​class="literal">Subje​ct:​</​code>·​line)​,​·​but·​also·​into·​a
183 »       ​····​database.​··​Anyone·​who·​comes·​along·​later·​and·​browses·​the183 »       ​····​database.​··​Anyone·​who·​comes·​along·​later·​and·​browses·​the
184 »       ​····​database·​by·​synopsis,​·​and·​finds·​a·​PR·​with·​a·​blank·​subject184 »       ​····​database·​by·​synopsis,​·​and·​finds·​a·​PR·​with·​a·​blank·​subject
185 »       ​····​line,​·​tends·​just·​to·​skip·​over·​it.​··​Remember·​that·​PRs·​stay185 »       ​····​line,​·​tends·​just·​to·​skip·​over·​it.​··​Remember·​that·​PRs·​stay
Offset 271, 15 lines modifiedOffset 271, 15 lines modified
271 »       ​····​at·​<code·​class="uri"><a·​class="uri"·​href="http:​/​/​www.​FreeBSD.​org/​search/​search.​html#mailinglists"·​target="_top">http:​/​/​www.​FreeBSD.​org/​search/​search.​html#mailinglists</​a></​code>271 »       ​····​at·​<code·​class="uri"><a·​class="uri"·​href="http:​/​/​www.​FreeBSD.​org/​search/​search.​html#mailinglists"·​target="_top">http:​/​/​www.​FreeBSD.​org/​search/​search.​html#mailinglists</​a></​code>
272 »       ​····​is·​always·​good·​preparation.​</​p></​li><li·​class="listitem"><p><​span·​class="emphasis"><em>​Be·​polite.​</​em></​span>272 »       ​····​is·​always·​good·​preparation.​</​p></​li><li·​class="listitem"><p><​span·​class="emphasis"><em>​Be·​polite.​</​em></​span>
273 »       ​····​Almost·​anyone·​who·​would·​potentially·​work·​on·​your·​PR·​is·​a273 »       ​····​Almost·​anyone·​who·​would·​potentially·​work·​on·​your·​PR·​is·​a
274 »       ​····​volunteer.​··​No·​one·​likes·​to·​be·​told·​that·​they·​have·​to·​do274 »       ​····​volunteer.​··​No·​one·​likes·​to·​be·​told·​that·​they·​have·​to·​do
275 »       ​····​something·​when·​they·​are·​already·​doing·​it·​for·​some275 »       ​····​something·​when·​they·​are·​already·​doing·​it·​for·​some
276 »       ​····​motivation·​other·​than·​monetary·​gain.​··​This·​is·​a·​good·​thing276 »       ​····​motivation·​other·​than·​monetary·​gain.​··​This·​is·​a·​good·​thing
277 »       ​····​to·​keep·​in·​mind·​at·​all·​times·​on·​Open·​Source277 »       ​····​to·​keep·​in·​mind·​at·​all·​times·​on·​Open·​Source
278 »       ​····​projects.​</​p></​li></​ul></​div></​div><div·​class="section"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59506360"></​a>4.​2.​·​Before·​you·​begin</​h3></​div></​div></​div><p>If·​you·​are·​using·​the·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​program,​·​make·​sure·​your278 »       ​····​projects.​</​p></​li></​ul></​div></​div><div·​class="section"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59462968"></​a>4.​2.​·​Before·​you·​begin</​h3></​div></​div></​div><p>If·​you·​are·​using·​the·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​program,​·​make·​sure·​your
279 »       ​<code·​class="envar">VISUAL<​/​code>·​(or·​<code·​class="envar">EDITOR<​/​code>·​if279 »       ​<code·​class="envar">VISUAL<​/​code>·​(or·​<code·​class="envar">EDITOR<​/​code>·​if
280 »       ​<code·​class="envar">VISUAL<​/​code>·​is·​not·​set)​·​environment·​variable·​is·​set280 »       ​<code·​class="envar">VISUAL<​/​code>·​is·​not·​set)​·​environment·​variable·​is·​set
281 »       ​to·​something·​sensible.​</​p><p>You·​should·​also·​make·​sure·​that·​mail·​delivery·​works·​fine.​281 »       ​to·​something·​sensible.​</​p><p>You·​should·​also·​make·​sure·​that·​mail·​delivery·​works·​fine.​
282 »       ​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​uses·​mail·​messages·​for·​the·​submission·​and282 »       ​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​uses·​mail·​messages·​for·​the·​submission·​and
283 »       ​tracking·​of·​problem·​reports.​··​If·​you·​cannot·​post·​mail·​messages283 »       ​tracking·​of·​problem·​reports.​··​If·​you·​cannot·​post·​mail·​messages
284 »       ​from·​the·​machine·​you·​are·​running·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​on,​·​your284 »       ​from·​the·​machine·​you·​are·​running·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​on,​·​your
285 »       ​problem·​report·​will·​not·​reach·​the·​GNATS·​database.​··​For·​details285 »       ​problem·​report·​will·​not·​reach·​the·​GNATS·​database.​··​For·​details
Offset 294, 15 lines modifiedOffset 294, 15 lines modified
294 »       ​so·​that·​the·​web·​display·​of·​the·​PR·​will·​be·​readable.​</​p><p>Similar·​considerations·​apply·​if·​you·​are·​using·​the·​web-​based294 »       ​so·​that·​the·​web·​display·​of·​the·​PR·​will·​be·​readable.​</​p><p>Similar·​considerations·​apply·​if·​you·​are·​using·​the·​web-​based
295 »       ​PR·​submittal·​form·​instead·​of·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>.​··​Note·​that295 »       ​PR·​submittal·​form·​instead·​of·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>.​··​Note·​that
296 »       ​cut-​and-​paste·​operations·​can·​have·​their·​own·​side-​effects·​on296 »       ​cut-​and-​paste·​operations·​can·​have·​their·​own·​side-​effects·​on
297 »       ​text·​formatting.​··​In·​certain·​cases·​it·​may·​be·​necessary·​to·​use297 »       ​text·​formatting.​··​In·​certain·​cases·​it·​may·​be·​necessary·​to·​use
298 »       ​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=uuencode&am​p;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>uuencode</​span>(1)​</​span></​a>·​to·​ensure·​that·​patches·​arrive·​unmodified.​</​p><p>Finally,​·​if·​your·​submission·​will·​be·​lengthy,​·​you·​should298 »       ​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=uuencode&am​p;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>uuencode</​span>(1)​</​span></​a>·​to·​ensure·​that·​patches·​arrive·​unmodified.​</​p><p>Finally,​·​if·​your·​submission·​will·​be·​lengthy,​·​you·​should
299 »       ​to·​prepare·​your·​work·​offline·​so·​that·​nothing·​will·​be·​lost·​in299 »       ​to·​prepare·​your·​work·​offline·​so·​that·​nothing·​will·​be·​lost·​in
300 »       ​case·​there·​is·​a·​problem·​submitting·​it.​··​This·​can·​be·​an·​especial300 »       ​case·​there·​is·​a·​problem·​submitting·​it.​··​This·​can·​be·​an·​especial
301 »       ​problem·​with·​the·​web·​form.​</​p></​div><div·​class="section"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59542456"></​a>4.​3.​·​Attaching·​patches·​or·​files</​h3></​div></​div></​div><p>The·​following·​applies·​to·​submitting·​PRs·​via·​email:​</​p><p>The·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​program·​has·​provisions·​for·​attaching301 »       ​problem·​with·​the·​web·​form.​</​p></​div><div·​class="section"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59507896"></​a>4.​3.​·​Attaching·​patches·​or·​files</​h3></​div></​div></​div><p>The·​following·​applies·​to·​submitting·​PRs·​via·​email:​</​p><p>The·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​program·​has·​provisions·​for·​attaching
302 »       ​files·​to·​a·​problem·​report.​··​You·​can·​attach·​as·​many·​files·​as302 »       ​files·​to·​a·​problem·​report.​··​You·​can·​attach·​as·​many·​files·​as
303 »       ​you·​want·​provided·​that·​each·​has·​a·​unique·​base·​name·​(i.​e.​·​the303 »       ​you·​want·​provided·​that·​each·​has·​a·​unique·​base·​name·​(i.​e.​·​the
304 »       ​name·​of·​the·​file·​proper,​·​without·​the·​path)​.​··​Just·​use·​the304 »       ​name·​of·​the·​file·​proper,​·​without·​the·​path)​.​··​Just·​use·​the
305 »       ​<code·​class="option">-​a</​code>·​command-​line·​option·​to·​specify·​the·​names305 »       ​<code·​class="option">-​a</​code>·​command-​line·​option·​to·​specify·​the·​names
306 »       ​of·​the·​files·​you·​wish·​to·​attach:​</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>send-​pr·​-​a·​/​var/​run/​dmesg·​-​a·​/​tmp/​errors</​code></​strong></​pre><p>Do·​not·​worry·​about·​binary·​files,​·​they·​will·​be·​automatically306 »       ​of·​the·​files·​you·​wish·​to·​attach:​</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>send-​pr·​-​a·​/​var/​run/​dmesg·​-​a·​/​tmp/​errors</​code></​strong></​pre><p>Do·​not·​worry·​about·​binary·​files,​·​they·​will·​be·​automatically
307 »       ​encoded·​so·​as·​not·​to·​upset·​your·​mail·​agent.​</​p><p>If·​you·​attach·​a·​patch,​·​make·​sure·​you·​use·​the307 »       ​encoded·​so·​as·​not·​to·​upset·​your·​mail·​agent.​</​p><p>If·​you·​attach·​a·​patch,​·​make·​sure·​you·​use·​the
308 »       ​<code·​class="option">-​c</​code>·​or·​<code·​class="option">-​u</​code>·​option·​to308 »       ​<code·​class="option">-​c</​code>·​or·​<code·​class="option">-​u</​code>·​option·​to
Offset 333, 15 lines modifiedOffset 333, 15 lines modified
333 »       ​allows·​you·​to·​modify·​it·​without·​having·​to·​resubmit·​the·​entire333 »       ​allows·​you·​to·​modify·​it·​without·​having·​to·​resubmit·​the·​entire
334 »       ​patch·​in·​a·​followup·​to·​the·​original·​PR.​··​Finally,​·​large334 »       ​patch·​in·​a·​followup·​to·​the·​original·​PR.​··​Finally,​·​large
335 »       ​patches·​simply·​increase·​the·​size·​of·​the·​database,​·​since335 »       ​patches·​simply·​increase·​the·​size·​of·​the·​database,​·​since
336 »       ​closed·​PRs·​are·​not·​actually·​deleted·​but·​instead·​kept·​and336 »       ​closed·​PRs·​are·​not·​actually·​deleted·​but·​instead·​kept·​and
337 »       ​simply·​marked·​as·​<code·​class="literal">close​d</​code>.​</​p><p>You·​should·​also·​take·​note·​that·​unless·​you·​explicitly337 »       ​simply·​marked·​as·​<code·​class="literal">close​d</​code>.​</​p><p>You·​should·​also·​take·​note·​that·​unless·​you·​explicitly
338 »       ​specify·​otherwise·​in·​your·​PR·​or·​in·​the·​patch·​itself,​·​any338 »       ​specify·​otherwise·​in·​your·​PR·​or·​in·​the·​patch·​itself,​·​any
339 »       ​patches·​you·​submit·​will·​be·​assumed·​to·​be·​licensed·​under·​the339 »       ​patches·​you·​submit·​will·​be·​assumed·​to·​be·​licensed·​under·​the
340 »       ​same·​terms·​as·​the·​original·​file·​you·​modified.​</​p></​div><div·​class="section"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59585720"></​a>4.​4.​·​Filling·​out·​the·​template</​h3></​div></​div></​div><p>The·​next·​section·​applies·​to·​the·​email·​method·​only:​</​p><p>When·​you·​run·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>,​·​you·​are·​presented·​with·​a340 »       ​same·​terms·​as·​the·​original·​file·​you·​modified.​</​p></​div><div·​class="section"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59529400"></​a>4.​4.​·​Filling·​out·​the·​template</​h3></​div></​div></​div><p>The·​next·​section·​applies·​to·​the·​email·​method·​only:​</​p><p>When·​you·​run·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>,​·​you·​are·​presented·​with·​a
341 »       ​template.​··​The·​template·​consists·​of·​a·​list·​of·​fields,​·​some·​of341 »       ​template.​··​The·​template·​consists·​of·​a·​list·​of·​fields,​·​some·​of
342 »       ​which·​are·​pre-​filled,​·​and·​some·​of·​which·​have·​comments·​explaining342 »       ​which·​are·​pre-​filled,​·​and·​some·​of·​which·​have·​comments·​explaining
343 »       ​their·​purpose·​or·​listing·​acceptable·​values.​··​Do·​not·​worry343 »       ​their·​purpose·​or·​listing·​acceptable·​values.​··​Do·​not·​worry
344 »       ​about·​the·​comments;​·​they·​will·​be·​removed·​automatically·​if·​you344 »       ​about·​the·​comments;​·​they·​will·​be·​removed·​automatically·​if·​you
345 »       ​do·​not·​modify·​them·​or·​remove·​them·​yourself.​</​p><p>At·​the·​top·​of·​the·​template,​·​below·​the345 »       ​do·​not·​modify·​them·​or·​remove·​them·​yourself.​</​p><p>At·​the·​top·​of·​the·​template,​·​below·​the
346 »       ​<code·​class="literal">SEND-​PR:​</​code>·​lines,​·​are·​the·​email·​headers.​··​You346 »       ​<code·​class="literal">SEND-​PR:​</​code>·​lines,​·​are·​the·​email·​headers.​··​You
347 »       ​do·​not·​normally·​need·​to·​modify·​these,​·​unless·​you·​are·​sending347 »       ​do·​not·​normally·​need·​to·​modify·​these,​·​unless·​you·​are·​sending
Offset 485, 15 lines modifiedOffset 485, 15 lines modified
485 »       ​····​it·​may·​mislead·​a·​developer·​into·​making·​incorrect485 »       ​····​it·​may·​mislead·​a·​developer·​into·​making·​incorrect
486 »       ​····​assumptions·​about·​the·​problem.​</​p></​li><li·​class="listitem"><p><​span·​class="emphasis"><em>​How-​To-​Repeat:​</​em></​span>·​A·​summary·​of·​the486 »       ​····​assumptions·​about·​the·​problem.​</​p></​li><li·​class="listitem"><p><​span·​class="emphasis"><em>​How-​To-​Repeat:​</​em></​span>·​A·​summary·​of·​the
487 »       ​····​actions·​you·​need·​to·​take·​to·​reproduce·​the·​problem.​</​p></​li><li·​class="listitem"><p><​span·​class="emphasis"><em>​Fix:​</​em></​span>·​Preferably·​a·​patch,​·​or·​at487 »       ​····​actions·​you·​need·​to·​take·​to·​reproduce·​the·​problem.​</​p></​li><li·​class="listitem"><p><​span·​class="emphasis"><em>​Fix:​</​em></​span>·​Preferably·​a·​patch,​·​or·​at
488 »       ​····​least·​a·​workaround·​(which·​not·​only·​helps·​other·​people·​with488 »       ​····​least·​a·​workaround·​(which·​not·​only·​helps·​other·​people·​with
489 »       ​····​the·​same·​problem·​work·​around·​it,​·​but·​may·​also·​help·​a489 »       ​····​the·​same·​problem·​work·​around·​it,​·​but·​may·​also·​help·​a
490 »       ​····​developer·​understand·​the·​cause·​for·​the·​problem)​,​·​but·​if490 »       ​····​developer·​understand·​the·​cause·​for·​the·​problem)​,​·​but·​if
491 »       ​····​you·​do·​not·​have·​any·​firm·​ideas·​for·​either,​·​it·​is·​better·​to491 »       ​····​you·​do·​not·​have·​any·​firm·​ideas·​for·​either,​·​it·​is·​better·​to
492 »       ​····​leave·​this·​field·​blank·​than·​to·​speculate.​</​p></​li></​ul></​div></​div><div·​class="section"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59848120"></​a>4.​5.​·​Sending·​off·​the·​problem·​report</​h3></​div></​div></​div><p>If·​you·​are·​using·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>:​</​p><p>Once·​you·​are·​done·​filling·​out·​the·​template,​·​have·​saved·​it,​492 »       ​····​leave·​this·​field·​blank·​than·​to·​speculate.​</​p></​li></​ul></​div></​div><div·​class="section"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59787320"></​a>4.​5.​·​Sending·​off·​the·​problem·​report</​h3></​div></​div></​div><p>If·​you·​are·​using·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>:​</​p><p>Once·​you·​are·​done·​filling·​out·​the·​template,​·​have·​saved·​it,​
493 »       ​and·​exit·​your·​editor,​·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​will·​prompt·​you·​with493 »       ​and·​exit·​your·​editor,​·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​will·​prompt·​you·​with
494 »       ​<code·​class="prompt">s)​end,​·​e)​dit·​or·​a)​bort?</​code>.​··​You·​can·​then·​hit494 »       ​<code·​class="prompt">s)​end,​·​e)​dit·​or·​a)​bort?</​code>.​··​You·​can·​then·​hit
495 »       ​<strong·​class="userinput"><co​de>s</​code></​strong>·​to·​go·​ahead·​and·​submit·​the·​problem·​report,​495 »       ​<strong·​class="userinput"><co​de>s</​code></​strong>·​to·​go·​ahead·​and·​submit·​the·​problem·​report,​
496 »       ​<strong·​class="userinput"><co​de>e</​code></​strong>·​to·​restart·​the·​editor·​and·​make496 »       ​<strong·​class="userinput"><co​de>e</​code></​strong>·​to·​restart·​the·​editor·​and·​make
497 »       ​further·​modifications,​·​or·​<strong·​class="userinput"><co​de>a</​code></​strong>·​to·​abort.​497 »       ​further·​modifications,​·​or·​<strong·​class="userinput"><co​de>a</​code></​strong>·​to·​abort.​
498 »       ​If·​you·​choose·​the·​latter,​·​your·​problem·​report·​will·​remain·​on498 »       ​If·​you·​choose·​the·​latter,​·​your·​problem·​report·​will·​remain·​on
499 »       ​disk·​(<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​will·​tell·​you·​the·​filename·​before·​it499 »       ​disk·​(<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=send-​pr&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>send-​pr</​span>(1)​</​span></​a>·​will·​tell·​you·​the·​filename·​before·​it
Offset 569, 8 lines modifiedOffset 569, 8 lines modified
569 ······​so·​unless·​you·​are·​in·​a·​hurry,​·​no·​action·​needs·​to·​be·​taken.​</​p></​div><div·​class="section"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="pr-​further"></​a>7.​·​Further·​Reading</​h2></​div></​div></​div><p>This·​is·​a·​list·​of·​resources·​relevant·​to·​the·​proper·​writing569 ······​so·​unless·​you·​are·​in·​a·​hurry,​·​no·​action·​needs·​to·​be·​taken.​</​p></​div><div·​class="section"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="pr-​further"></​a>7.​·​Further·​Reading</​h2></​div></​div></​div><p>This·​is·​a·​list·​of·​resources·​relevant·​to·​the·​proper·​writing
570 ······​and·​processing·​of·​problem·​reports.​··​It·​is·​by·​no·​means·​complete.​</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p><​a·​class="link"·​href="http:​/​/​www.​chiark.​greenend.​org.​uk/​~sgtatham/​bugs.​html"·​target="_top">570 ······​and·​processing·​of·​problem·​reports.​··​It·​is·​by·​no·​means·​complete.​</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p><​a·​class="link"·​href="http:​/​/​www.​chiark.​greenend.​org.​uk/​~sgtatham/​bugs.​html"·​target="_top">
571 »       ​····​How·​to·​Report·​Bugs·​Effectively</​a>——an·​excellent571 »       ​····​How·​to·​Report·​Bugs·​Effectively</​a>——an·​excellent
572 »       ​····​essay·​by·​Simon·​G.​·​Tatham·​on·​composing·​useful·​(non-​FreeBSD-​specific)​572 »       ​····​essay·​by·​Simon·​G.​·​Tatham·​on·​composing·​useful·​(non-​FreeBSD-​specific)​
573 »       ​····​problem·​reports.​</​p></​li><li·​class="listitem"><p><​a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​pr-​guidelines/​article.​html"·​target="_top">Problem​573 »       ​····​problem·​reports.​</​p></​li><li·​class="listitem"><p><​a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​pr-​guidelines/​article.​html"·​target="_top">Problem​
574 »       ​··​Report·​Handling·​Guidelines</​a>——valuable·​insight574 »       ​··​Report·​Handling·​Guidelines</​a>——valuable·​insight
575 »       ​··​into·​how·​problem·​reports·​are·​handled·​by·​the·​FreeBSD575 »       ​··​into·​how·​problem·​reports·​are·​handled·​by·​the·​FreeBSD
576 »       ​··​developers.​</​p></​li></​ul></​div></​div><div·​class="index"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59936440"></​a>索引</​h2></​div></​div></​div><div·​class="index"><div·​class="indexdiv"><h3>​P</​h3><dl><dt>problem·​reports,​·​<a·​class="indexterm"·​href="#idp60868920">W​riting·​FreeBSD·​Problem·​Reports</​a></​dt></​dl></​div></​div></​div></​div></​body></​html>576 »       ​··​developers.​</​p></​li></​ul></​div></​div><div·​class="index"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59891384"></​a>索引</​h2></​div></​div></​div><div·​class="index"><div·​class="indexdiv"><h3>​P</​h3><dl><dt>problem·​reports,​·​<a·​class="indexterm"·​href="#idp60799288">W​riting·​FreeBSD·​Problem·​Reports</​a></​dt></​dl></​div></​div></​div></​div></​body></​html>
/usr/local/share/doc/freebsd/zh_TW.UTF-8/articles/remote-install/article.html
Offset 1, 9 lines modifiedOffset 1, 9 lines modified
1 <?xml·​version="1.​0"·​encoding="utf-​8"?>1 <?xml·​version="1.​0"·​encoding="utf-​8"?>
2 <!DOCTYPE·​html·​PUBLIC·​"-​/​/​W3C/​/​DTD·​XHTML·​1.​0·​Transitional/​/​EN"·​"http:​/​/​www.​w3.​org/​TR/​xhtml1/​DTD/​xhtml1-​transitional.​dtd"><html·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"><head><meta·​http-​equiv="Content-​Type"·​content="text/​html;​·​charset=utf-​8"·​/​><title>遠端安裝·​FreeBSD·​作業系統而不必接·​Remote·​Console</​title><link·​rel="stylesheet"·​type="text/​css"·​href="docbook.​css"·​/​><link·​rev="made"·​href="mailto:​doc@FreeBSD.​org"·​/​><meta·​name="generator"·​content="DocBook·​XSL·​Stylesheets·​V1.​78.​1"·​/​><meta·​name="description"·​content="本文介紹如何在沒辦法連到​遠端·​console·​的機器做·​FreeBSD·​遠端安裝。·​本文構想來自於作者與·​Martin·​Matuska·​的合作成果,·​以及·​Paweł·​Jakub·​Dawidek·​所投注的諸多心血。"·​/​><script·​xmlns=""·​type="text/​javascript"·​src="/​layout/​js/​google.​js"></​script></​head><body><div·​xml:​lang="zh_tw"·​class="article"·​lang="zh_tw"><div·​xmlns=""·​class="titlepage"><di​v><div><h1·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60852664"></​a>遠端安裝·​FreeBSD·​作業系統而不必接·​Remote·​Console</​h1></​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><h3·​class="author"><span·​class="firstname">·​✂2 <!DOCTYPE·​html·​PUBLIC·​"-​/​/​W3C/​/​DTD·​XHTML·​1.​0·​Transitional/​/​EN"·​"http:​/​/​www.​w3.​org/​TR/​xhtml1/​DTD/​xhtml1-​transitional.​dtd"><html·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"><head><meta·​http-​equiv="Content-​Type"·​content="text/​html;​·​charset=utf-​8"·​/​><title>遠端安裝·​FreeBSD·​作業系統而不必接·​Remote·​Console</​title><link·​rel="stylesheet"·​type="text/​css"·​href="docbook.​css"·​/​><link·​rev="made"·​href="mailto:​doc@FreeBSD.​org"·​/​><meta·​name="generator"·​content="DocBook·​XSL·​Stylesheets·​V1.​78.​1"·​/​><meta·​name="description"·​content="本文介紹如何在沒辦法連到​遠端·​console·​的機器做·​FreeBSD·​遠端安裝。·​本文構想來自於作者與·​Martin·​Matuska·​的合作成果,·​以及·​Paweł·​Jakub·​Dawidek·​所投注的諸多心血。"·​/​><script·​xmlns=""·​type="text/​javascript"·​src="/​layout/​js/​google.​js"></​script></​head><body><div·​xml:​lang="zh_tw"·​class="article"·​lang="zh_tw"><div·​xmlns=""·​class="titlepage"><di​v><div><h1·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60856760"></​a>遠端安裝·​FreeBSD·​作業系統而不必接·​Remote·​Console</​h1></​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><h3·​class="author"><span·​class="firstname">·​✂
3 ··​本文中出現的眾多商標,以及·​FreeBSD·​Project·​本身廣所人知的商標,後面將以·​'™'·​或·​'®'·​符號來標註。</​p></​div></​div><div>··​2014-​05-​29·​由·​lwhsu.​</​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="abstract"><div​·​class="abstract-​title">摘要</​div><p>本文介紹如何在沒辦法連到遠端​·​console·​的機器做·​FreeBSD·​遠端安裝。3 ··​本文中出現的眾多商標,以及·​FreeBSD·​Project·​本身廣所人知的商標,後面將以·​'™'·​或·​'®'·​符號來標註。</​p></​div></​div><div>··​2014-​05-​29·​由·​lwhsu.​</​div><div><div·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="abstract"><div​·​class="abstract-​title">摘要</​div><p>本文介紹如何在沒辦法連到遠端​·​console·​的機器做·​FreeBSD·​遠端安裝。
4 »       ​本文構想來自於作者與·​Martin·​Matuska·​的合作成果,4 »       ​本文構想來自於作者與·​Martin·​Matuska·​的合作成果,
5 »       ​以及·​Paweł·​Jakub·​Dawidek·​所投注的諸多心血。</​p></​div></​div></​div><div·​class="docformatnavi"​>5 »       ​以及·​Paweł·​Jakub·​Dawidek·​所投注的諸多心血。</​p></​div></​div></​div><div·​class="docformatnavi"​>
6 ······​[6 ······​[
7 ······​<a·​href="index.​html">章節模式</​a>7 ······​<a·​href="index.​html">章節模式</​a>
8 ······​/​8 ······​/​
9 ······9 ······
Offset 44, 48 lines modifiedOffset 44, 48 lines modified
44 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>cd·​mfsbsd-​1.​0-​beta1/​</​code></​strong></​pre><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="mfsbsd-​config"></​a>3.​1.​·​設定·​<span·​class="application">m​fsBSD</​span></​h3></​div></​div></​div><p>在將·​<span·​class="application">m​fsBSD</​span>·​開機之前,44 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>cd·​mfsbsd-​1.​0-​beta1/​</​code></​strong></​pre><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="mfsbsd-​config"></​a>3.​1.​·​設定·​<span·​class="application">m​fsBSD</​span></​h3></​div></​div></​div><p>在將·​<span·​class="application">m​fsBSD</​span>·​開機之前,
45 »       ​有幾個重要設定要先設妥。··​此時最重要的設定,很明顯就是網路設定。45 »       ​有幾個重要設定要先設妥。··​此時最重要的設定,很明顯就是網路設定。
46 »       ​到底網路怎麼設最好,則取決於所處的網路環境​,46 »       ​到底網路怎麼設最好,則取決於所處的網路環境​,
47 »       ​以及該網路卡會以哪一種驅動程式載入而定。··​我們將會看到47 »       ​以及該網路卡會以哪一種驅動程式載入而定。··​我們將會看到
48 »       ​<span·​class="application">m​fsBSD</​span>·​如何在任何網路情況下進行設定。</​p><p>另一件重要事就是設定·​<code·​class="systemitem">ro​ot</​code>·​密碼。48 »       ​<span·​class="application">m​fsBSD</​span>·​如何在任何網路情況下進行設定。</​p><p>另一件重要事就是設定·​<code·​class="systemitem">ro​ot</​code>·​密碼。
49 »       ​這點可以透過·​<code·​class="filename">conf​/​rootpw.​conf</​code>·​來完成。49 »       ​這點可以透過·​<code·​class="filename">conf​/​rootpw.​conf</​code>·​來完成。
50 »       ​請切記:該檔密碼是以明文方式存放,因此不建​議放真正平常有在用的密碼。50 »       ​請切記:該檔密碼是以明文方式存放,因此不建​議放真正平常有在用的密碼。
51 »       ​然而這密碼只是臨時密碼而已,可以在之後開機​時再做更換。</​p><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59353784"></​a>3.​1.​1.​·​設定網路(<code·​class="filename">conf​/​interfaces.​conf</​code>·​方式)​</​h4></​div></​div></​div><p>若對要裝的機器網卡為何還不知​道是哪一款,但可以善加利用51 »       ​然而這密碼只是臨時密碼而已,可以在之後開機​時再做更換。</​p><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59356344"></​a>3.​1.​1.​·​設定網路(<code·​class="filename">conf​/​interfaces.​conf</​code>·​方式)​</​h4></​div></​div></​div><p>若對要裝的機器網卡為何還不知​道是哪一款,但可以善加利用
52 »       ​··​<span·​class="application">m​fsBSD</​span>·​的自動偵測功能。52 »       ​··​<span·​class="application">m​fsBSD</​span>·​的自動偵測功能。
53 »       ​··​<span·​class="application">m​fsBSD</​span>·​的開機·​script·​會根據網卡的·​MAC53 »       ​··​<span·​class="application">m​fsBSD</​span>·​的開機·​script·​會根據網卡的·​MAC
54 »       ​··​位址範圍來偵測正確的驅動程式,像是下列的54 »       ​··​位址範圍來偵測正確的驅動程式,像是下列的
55 »       ​··​<code·​class="filename">conf​/​interfaces.​conf</​code>·​設定內容:</​p><pre·​class="programlisting​">initconf_interfaces​="ext1"55 »       ​··​<code·​class="filename">conf​/​interfaces.​conf</​code>·​設定內容:</​p><pre·​class="programlisting​">initconf_interfaces​="ext1"
56 initconf_mac_ext1="00​:​00:​00:​00:​00:​00"56 initconf_mac_ext1="00​:​00:​00:​00:​00:​00"
57 initconf_ip_ext1="192​.​168.​0.​2"57 initconf_ip_ext1="192​.​168.​0.​2"
58 initconf_netmask_ext1​="255.​255.​255.​0"</​pre><p>別忘了在·​<code·​class="filename">conf​/​rc.​conf</​code>·​內要加上58 initconf_netmask_ext1​="255.​255.​255.​0"</​pre><p>別忘了在·​<code·​class="filename">conf​/​rc.​conf</​code>·​內要加上
59 »       ​··​<code·​class="literal">defau​ltrouter</​code>·​的相關設定:</​p><pre·​class="programlisting​">defaultrouter="192.​168.​0.​1"</​pre></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59365560"></​a>3.​1.​2.​·​設定網路(<code·​class="filename">conf​/​rc.​conf</​code>·​方式)​</​h4></​div></​div></​div><p>若已經知道網卡是哪一種,那麼​要設定網路的話直接改59 »       ​··​<code·​class="literal">defau​ltrouter</​code>·​的相關設定:</​p><pre·​class="programlisting​">defaultrouter="192.​168.​0.​1"</​pre></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59372088"></​a>3.​1.​2.​·​設定網路(<code·​class="filename">conf​/​rc.​conf</​code>·​方式)​</​h4></​div></​div></​div><p>若已經知道網卡是哪一種,那麼​要設定網路的話直接改
60 »       ​··​<code·​class="filename">conf​/​rc.​conf</​code>·​會比較方便。60 »       ​··​<code·​class="filename">conf​/​rc.​conf</​code>·​會比較方便。
61 »       ​··​該檔設定語法與·​FreeBSD·​標準的·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=rc.​conf&amp;​sektion=5&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>rc.​conf</​span>(5)​</​span></​a>·​是一致的。</​p><p>舉個例子,若知道該機器網卡是用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=re&amp;​sektion=4&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>re</​span>(4)​</​span></​a>,那麼就在61 »       ​··​該檔設定語法與·​FreeBSD·​標準的·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=rc.​conf&amp;​sektion=5&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>rc.​conf</​span>(5)​</​span></​a>·​是一致的。</​p><p>舉個例子,若知道該機器網卡是用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=re&amp;​sektion=4&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>re</​span>(4)​</​span></​a>,那麼就在
62 »       ​··​<code·​class="filename">conf​/​rc.​conf</​code>·​做下列類似設定:</​p><pre·​class="programlisting​">defaultrouter="192.​168.​0.​1"62 »       ​··​<code·​class="filename">conf​/​rc.​conf</​code>·​做下列類似設定:</​p><pre·​class="programlisting​">defaultrouter="192.​168.​0.​1"
63 ifconfig_re0="inet·​192.​168.​0.​2·​netmask·​255.​255.​255.​0"</​pre></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="mfsbsd-​build"></​a>3.​2.​·​打造·​<span·​class="application">m​fsBSD</​span>·​image</​h3></​div></​div></​div><p>打造·​<span·​class="application">m​fsBSD</​span>63 ifconfig_re0="inet·​192.​168.​0.​2·​netmask·​255.​255.​255.​0"</​pre></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="mfsbsd-​build"></​a>3.​2.​·​打造·​<span·​class="application">m​fsBSD</​span>·​image</​h3></​div></​div></​div><p>打造·​<span·​class="application">m​fsBSD</​span>
64 »       ​image·​檔的過程相當簡單。</​p><p>首先是把·​FreeBSD·​安裝光碟或者安裝用的·​<acronym·​class="acronym">ISO</​acronym>·​image64 »       ​image·​檔的過程相當簡單。</​p><p>首先是把·​FreeBSD·​安裝光碟或者安裝用的·​<acronym·​class="acronym">ISO</​acronym>·​image
65 »       ​檔丟到·​<code·​class="filename">/​cdrom</​code>。65 »       ​檔丟到·​<code·​class="filename">/​cdrom</​code>。
66 »       ​為維持所有例子的一致,本文假設都是用·​FreeBSD·​7.​0-​RELEASE66 »       ​為維持所有例子的一致,本文假設都是用·​FreeBSD·​7.​0-​RELEASE
67 »       ​<acronym·​class="acronym">ISO</​acronym>。··​而把·​ISO·​image·​檔掛載到·​<code·​class="filename">/​cdrom</​code>·​目錄相當簡單,67 »       ​<acronym·​class="acronym">ISO</​acronym>。··​而把·​ISO·​image·​檔掛載到·​<code·​class="filename">/​cdrom</​code>·​目錄相當簡單,
68 »       ​就是用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=mdconfig&am​p;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>mdconfig</​span>(8)​</​span></​a>:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>mdconfig·​-​a·​-​t·​vnode·​-​u·​10·​-​f·​7.​0-​RELEASE-​amd64-​disc1.​iso</​code></​strong>68 »       ​就是用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=mdconfig&am​p;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>mdconfig</​span>(8)​</​span></​a>:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>mdconfig·​-​a·​-​t·​vnode·​-​u·​10·​-​f·​7.​0-​RELEASE-​amd64-​disc1.​iso</​code></​strong>
69 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>mount_cd9660·​/​dev/​md10·​/​cdrom</​code></​strong></​pre><p>接著就開始打造可開機的·​<span·​class="application">m​fsBSD</​span>69 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>mount_cd9660·​/​dev/​md10·​/​cdrom</​code></​strong></​pre><p>接著就開始打造可開機的·​<span·​class="application">m​fsBSD</​span>
70 »       ​image:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>make·​BASE=/​cdrom/​7.​0-​RELEASE</​code></​strong></​pre><div·​xmlns=""·​class="note"><h3·​class="admontitle">注意​:​·​</​h3><p·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml">上述的·​<code·​class="command">make<​/​code>·​指令要在70 »       ​image:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>make·​BASE=/​cdrom/​7.​0-​RELEASE</​code></​strong></​pre><div·​xmlns=""·​class="note"><h3·​class="admontitle">注意​:​·​</​h3><p·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml">上述的·​<code·​class="command">make<​/​code>·​指令要在
71 »       ​··​<span·​class="application">m​fsBSD</​span>·​的最上層目錄執行,比方說·​<code·​class="filename">~/​mfsbsd-​1.​0-​beta1/​</​code>。</​p></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59437880"></​a>3.​3.​·​<span·​class="application">m​fsBSD</​span>·​開動</​h3></​div></​div></​div><p>現在·​<span·​class="application">m​fsBSD</​span>·​image·​已經備妥,71 »       ​··​<span·​class="application">m​fsBSD</​span>·​的最上層目錄執行,比方說·​<code·​class="filename">~/​mfsbsd-​1.​0-​beta1/​</​code>。</​p></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59439928"></​a>3.​3.​·​<span·​class="application">m​fsBSD</​span>·​開動</​h3></​div></​div></​div><p>現在·​<span·​class="application">m​fsBSD</​span>·​image·​已經備妥,
72 »       ​要上傳到遠端機器的救急系統或者預先安裝的·​<span·​class="trademark">Lin​ux</​span>®·​distribution。72 »       ​要上傳到遠端機器的救急系統或者預先安裝的·​<span·​class="trademark">Lin​ux</​span>®·​distribution。
73 »       ​要完成這工作最適合的工具就是·​<span·​class="application">s​cp</​span>:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>scp·​disk.​img·​root@192.​168.​0.​2:​.​</​code></​strong></​pre><p>為了能順利啟動·​<span·​class="application">m​fsBSD</​span>·​image,73 »       ​要完成這工作最適合的工具就是·​<span·​class="application">s​cp</​span>:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>scp·​disk.​img·​root@192.​168.​0.​2:​.​</​code></​strong></​pre><p>為了能順利啟動·​<span·​class="application">m​fsBSD</​span>·​image,
74 »       ​要把檔案放在欲安裝機器的第一顆(可開機)​硬碟上。74 »       ​要把檔案放在欲安裝機器的第一顆(可開機)​硬碟上。
75 »       ​假設例子的第一顆開機硬碟代號為·​<code·​class="filename">sda<​/​code>,75 »       ​假設例子的第一顆開機硬碟代號為·​<code·​class="filename">sda<​/​code>,
76 »       ​那麼作法就類似下面這樣:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>dd·​if=/​root/​disk.​img·​of=/​dev/​sda·​bs=1m</​code></​strong></​pre><p>若一切順利,該·​image·​檔現在應該會在第一顆硬碟的76 »       ​那麼作法就類似下面這樣:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>dd·​if=/​root/​disk.​img·​of=/​dev/​sda·​bs=1m</​code></​strong></​pre><p>若一切順利,該·​image·​檔現在應該會在第一顆硬碟的
77 »       ​<acronym·​class="acronym">MBR</​acronym>·​磁區並可以開始進行重開機了。··​可以用77 »       ​<acronym·​class="acronym">MBR</​acronym>·​磁區並可以開始進行重開機了。··​可以用
78 »       ​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=ping&amp;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>ping</​span>(8)​</​span></​a>·​工具來檢測該機器開機完畢與否。··​一旦·​ping·​到之後,78 »       ​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=ping&amp;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>ping</​span>(8)​</​span></​a>·​工具來檢測該機器開機完畢與否。··​一旦·​ping·​到之後,
79 »       ​就可以透過·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=ssh&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>ssh</​span>(1)​</​span></​a>·​連進去,並且用·​<code·​class="systemitem">ro​ot</​code>79 »       ​就可以透過·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=ssh&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>ssh</​span>(1)​</​span></​a>·​連進去,並且用·​<code·​class="systemitem">ro​ot</​code>
80 »       ​以及剛設定的密碼登入。</​p></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="installation"></​a>4.​·​FreeBSD·​作業系統的安裝</​h2></​div></​div></​div><p>現在·​<span·​class="application">m​fsBSD</​span>·​已順利啟動,並且應該可以透過80 »       ​以及剛設定的密碼登入。</​p></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="installation"></​a>4.​·​FreeBSD·​作業系統的安裝</​h2></​div></​div></​div><p>現在·​<span·​class="application">m​fsBSD</​span>·​已順利啟動,並且應該可以透過
81 ······​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=ssh&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>ssh</​span>(1)​</​span></​a>·​方式來連。··​本節將介紹如何建立·​slice·​分割、設定81 ······​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=ssh&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>ssh</​span>(1)​</​span></​a>·​方式來連。··​本節將介紹如何建立·​slice·​分割、設定
82 ······​<span·​class="application">g​mirror</​span>·​以作·​RAID-​1、如何以82 ······​<span·​class="application">g​mirror</​span>·​以作·​RAID-​1、如何以
83 ······​<span·​class="application">s​ysinstall</​span>·​來安裝·​FreeBSD83 ······​<span·​class="application">s​ysinstall</​span>·​來安裝·​FreeBSD
84 ······​作業系統的最小化安裝。</​p><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59478840"></​a>4.​1.​·​準備硬碟</​h3></​div></​div></​div><p>首先要作的是配置硬碟空間給·​FreeBSD,像是建立·​slice·​跟分割區。84 ······​作業系統的最小化安裝。</​p><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59481144"></​a>4.​1.​·​準備硬碟</​h3></​div></​div></​div><p>首先要作的是配置硬碟空間給·​FreeBSD,像是建立·​slice·​跟分割區。
85 »       ​很明顯地,目前在跑的作業系統是載入到系統記​憶體內執行,85 »       ​很明顯地,目前在跑的作業系統是載入到系統記​憶體內執行,
86 »       ​因此要對硬碟配置並無任何問題。··​這些工作可以用86 »       ​因此要對硬碟配置並無任何問題。··​這些工作可以用
87 »       ​<span·​class="application">s​ysinstall</​span>·​或者以·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=fdisk&amp;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>fdisk</​span>(8)​</​span></​a>·​搭配87 »       ​<span·​class="application">s​ysinstall</​span>·​或者以·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=fdisk&amp;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>fdisk</​span>(8)​</​span></​a>·​搭配
88 »       ​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=bsdlabel&am​p;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>bsdlabel</​span>(8)​</​span></​a>·​來完成。</​p><p>首先先把各硬碟都先清空。··​請對各硬碟作下列指令:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>dd·​if=/​dev/​zero·​of=/​dev/​ad0·​count=2</​code></​strong></​pre><p>接著,以您慣用的工具來建立·​slice·​以及設定·​label。··​通常會建議以88 »       ​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=bsdlabel&am​p;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>bsdlabel</​span>(8)​</​span></​a>·​來完成。</​p><p>首先先把各硬碟都先清空。··​請對各硬碟作下列指令:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>dd·​if=/​dev/​zero·​of=/​dev/​ad0·​count=2</​code></​strong></​pre><p>接著,以您慣用的工具來建立·​slice·​以及設定·​label。··​通常會建議以
89 »       ​的·​<span·​class="application">s​ysinstall</​span>·​工具來作會比較輕鬆,89 »       ​的·​<span·​class="application">s​ysinstall</​span>·​工具來作會比較輕鬆,
90 »       ​或者是強而又不太會出槌的文字介面·​<span·​class="trademark">UNI​X</​span>®·​標準工具(像是·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=fdisk&amp;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>fdisk</​span>(8)​</​span></​a>,​90 »       ​或者是強而又不太會出槌的文字介面·​<span·​class="trademark">UNI​X</​span>®·​標準工具(像是·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=fdisk&amp;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>fdisk</​span>(8)​</​span></​a>,​
91 »       ​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=bsdlabel&am​p;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>bsdlabel</​span>(8)​</​span></​a>)​,這部分稍後也會一併介紹。··​前者部分在·​FreeBSD·​Handbook91 »       ​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=bsdlabel&am​p;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>bsdlabel</​span>(8)​</​span></​a>)​,這部分稍後也會一併介紹。··​前者部分在·​FreeBSD·​Handbook
Offset 118, 15 lines modifiedOffset 118, 15 lines modified
118 »       ​····​<code·​class="literal">d</​code>·​給·​<code·​class="filename">/​var</​code>,118 »       ​····​<code·​class="literal">d</​code>·​給·​<code·​class="filename">/​var</​code>,
119 »       ​····​<code·​class="literal">e</​code>·​給·​<code·​class="filename">/​usr</​code>,119 »       ​····​<code·​class="literal">e</​code>·​給·​<code·​class="filename">/​usr</​code>,
120 »       ​····​最後,會在稍後步驟把·​<code·​class="literal">f</​code>·​給120 »       ​····​最後,會在稍後步驟把·​<code·​class="literal">f</​code>·​給
121 »       ​····​<span·​class="application">Z​FS</​span>·​使用。</​p></​td></​tr><tr><td·​width="5%"·​valign="top"·​align="left"><p><a·​href="#bsdlabel-​restore"><span><img·​src="imagelib/​callouts/​4.​png"·​alt="4"·​border="0"·​/​></​span></​a>·​</​p></​td><td·​valign="top"·​align="left"><p>把剛剛的·​label·​設定先匯出,再匯入到第二顆硬碟上,121 »       ​····​<span·​class="application">Z​FS</​span>·​使用。</​p></​td></​tr><tr><td·​width="5%"·​valign="top"·​align="left"><p><a·​href="#bsdlabel-​restore"><span><img·​src="imagelib/​callouts/​4.​png"·​alt="4"·​border="0"·​/​></​span></​a>·​</​p></​td><td·​valign="top"·​align="left"><p>把剛剛的·​label·​設定先匯出,再匯入到第二顆硬碟上,
122 »       ​»       ​如此一來兩邊的硬碟·​label·​設定就會同樣。</​p></​td></​tr><tr><td·​width="5%"·​valign="top"·​align="left"><p><a·​href="#gmirror1"><spa​n><img·​src="imagelib/​callouts/​6.​png"·​alt="6"·​border="0"·​/​></​span></​a>·​</​p></​td><td·​valign="top"·​align="left"><p>請注意:<​code·​class="option">-​F</​code>·​選項是用在·​swap·​上。122 »       ​»       ​如此一來兩邊的硬碟·​label·​設定就會同樣。</​p></​td></​tr><tr><td·​width="5%"·​valign="top"·​align="left"><p><a·​href="#gmirror1"><spa​n><img·​src="imagelib/​callouts/​6.​png"·​alt="6"·​border="0"·​/​></​span></​a>·​</​p></​td><td·​valign="top"·​align="left"><p>請注意:<​code·​class="option">-​F</​code>·​選項是用在·​swap·​上。
123 »       ​····​這參數會讓·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=gmirror&amp​;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>gmirror</​span>(8)​</​span></​a>·​認為該硬體是處於可靠狀態,123 »       ​····​這參數會讓·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=gmirror&amp​;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>gmirror</​span>(8)​</​span></​a>·​認為該硬體是處於可靠狀態,
124 »       ​····​即使發生電源故障或系統當掉,也不會去同步。​</​p></​td></​tr><tr><td·​width="5%"·​valign="top"·​align="left"><p><a·​href="#newfs"><span><​img·​src="imagelib/​callouts/​7.​png"·​alt="7"·​border="0"·​/​></​span></​a>·​</​p></​td><td·​valign="top"·​align="left"><p>在各個有做​·​mirror·​的分割區上建立·​<span·​class="application">U​FS2</​span>124 »       ​····​即使發生電源故障或系統當掉,也不會去同步。​</​p></​td></​tr><tr><td·​width="5%"·​valign="top"·​align="left"><p><a·​href="#newfs"><span><​img·​src="imagelib/​callouts/​7.​png"·​alt="7"·​border="0"·​/​></​span></​a>·​</​p></​td><td·​valign="top"·​align="left"><p>在各個有做​·​mirror·​的分割區上建立·​<span·​class="application">U​FS2</​span>
125 »       ​····​檔案系統</​p></​td></​tr></​table></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59635896"></​a>4.​2.​·​系統安裝</​h3></​div></​div></​div><p>這裡是最重要的一環,125 »       ​····​檔案系統</​p></​td></​tr></​table></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59642040"></​a>4.​2.​·​系統安裝</​h3></​div></​div></​div><p>這裡是最重要的一環,
126 »       ​本節介紹實際上如何在先前一節所做好的硬碟安​裝最小化的·​FreeBSD,126 »       ​本節介紹實際上如何在先前一節所做好的硬碟安​裝最小化的·​FreeBSD,
127 »       ​為了完成此一目標,所有檔案系統都必須掛載妥​當,才能讓127 »       ​為了完成此一目標,所有檔案系統都必須掛載妥​當,才能讓
128 »       ​<span·​class="application">s​ysinstall</​span>·​可以把·​FreeBSD·​裝到硬碟內:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>mount·​/​dev/​mirror/​root·​/​mnt</​code></​strong>128 »       ​<span·​class="application">s​ysinstall</​span>·​可以把·​FreeBSD·​裝到硬碟內:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>mount·​/​dev/​mirror/​root·​/​mnt</​code></​strong>
129 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>mkdir·​/​mnt/​var·​/​mnt/​usr</​code></​strong>129 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>mkdir·​/​mnt/​var·​/​mnt/​usr</​code></​strong>
130 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>mount·​/​dev/​mirror/​var·​/​mnt/​var</​code></​strong>130 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>mount·​/​dev/​mirror/​var·​/​mnt/​var</​code></​strong>
131 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>mount·​/​dev/​mirror/​usr·​/​mnt/​usr</​code></​strong></​pre><p>做完上述動作之後,請執行·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=sysinstall&​amp;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>sysinstall</​span>(8)​</​span></​a>。··​請從主選單中選擇131 <code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>mount·​/​dev/​mirror/​usr·​/​mnt/​usr</​code></​strong></​pre><p>做完上述動作之後,請執行·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=sysinstall&​amp;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>sysinstall</​span>(8)​</​span></​a>。··​請從主選單中選擇
132 »       ​<span·​class="guimenuitem">C​ustom</​span>·​安裝,選132 »       ​<span·​class="guimenuitem">C​ustom</​span>·​安裝,選
Offset 141, 15 lines modifiedOffset 141, 15 lines modified
141 »       ​<span·​class="application">f​tp</​span>·​方式來進行。··​要離開本畫面,請選141 »       ​<span·​class="application">f​tp</​span>·​方式來進行。··​要離開本畫面,請選
142 »       ​<code·​class="option">Exit</​code>·​即可。</​p><div·​xmlns=""·​class="note"><h3·​class="admontitle">注意​:​·​</​h3><p·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml">至於·​<span·​class="guimenuitem">P​artition</​span>·​及142 »       ​<code·​class="option">Exit</​code>·​即可。</​p><div·​xmlns=""·​class="note"><h3·​class="admontitle">注意​:​·​</​h3><p·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml">至於·​<span·​class="guimenuitem">P​artition</​span>·​及
143 »       ​··​<span·​class="guimenuitem">L​abel</​span>·​步驟則可略過,143 »       ​··​<span·​class="guimenuitem">L​abel</​span>·​步驟則可略過,
144 »       ​··​因為這些目前已經都設定完畢了。</​p></​div><p>在·​<span·​class="guimenuitem">M​edia</​span>·​選單中請選144 »       ​··​因為這些目前已經都設定完畢了。</​p></​div><p>在·​<span·​class="guimenuitem">M​edia</​span>·​選單中請選
145 »       ​<code·​class="option">FTP</​code>。··​請選最近的·​mirror·​站,並且讓145 »       ​<code·​class="option">FTP</​code>。··​請選最近的·​mirror·​站,並且讓
146 »       ​<span·​class="application">s​ysinstall</​span>·​假設網路已經設妥。146 »       ​<span·​class="application">s​ysinstall</​span>·​假設網路已經設妥。
147 »       ​接下來就會回到·​<span·​class="guimenuitem">C​ustom</​span>·​選單。</​p><p>最後,按下·​<span·​class="guimenuitem">C​ommit</​span>·​即可開始進行安裝。147 »       ​接下來就會回到·​<span·​class="guimenuitem">C​ustom</​span>·​選單。</​p><p>最後,按下·​<span·​class="guimenuitem">C​ommit</​span>·​即可開始進行安裝。
148 »       ​完成安裝後,即可離開·​<span·​class="application">s​ysinstall</​span>。</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59690040"></​a>4.​3.​·​後續安裝步驟</​h3></​div></​div></​div><p>此時·​FreeBSD·​作業系統應該已經裝完,然而還有些後續流程要​做。148 »       ​完成安裝後,即可離開·​<span·​class="application">s​ysinstall</​span>。</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59692472"></​a>4.​3.​·​後續安裝步驟</​h3></​div></​div></​div><p>此時·​FreeBSD·​作業系統應該已經裝完,然而還有些後續流程要​做。
149 »       ​必須要做一些後續設定,才能讓·​FreeBSD·​可以開機跟登入。</​p><p>現在必須要用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=chroot&amp;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>chroot</​span>(8)​</​span></​a>·​以切到剛剛新裝好的系統內。149 »       ​必須要做一些後續設定,才能讓·​FreeBSD·​可以開機跟登入。</​p><p>現在必須要用·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=chroot&amp;​sektion=8&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>chroot</​span>(8)​</​span></​a>·​以切到剛剛新裝好的系統內。
150 »       ​指令如下:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>chroot·​/​mnt</​code></​strong></​pre><p>然後再打下列指令以繼續完成:​</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>把​·​<code·​class="literal">GENER​IC</​code>·​kernel·​複製到150 »       ​指令如下:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>chroot·​/​mnt</​code></​strong></​pre><p>然後再打下列指令以繼續完成:​</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>把​·​<code·​class="literal">GENER​IC</​code>·​kernel·​複製到
151 »       ​····​<code·​class="filename">/​boot/​kernel</​code>151 »       ​····​<code·​class="filename">/​boot/​kernel</​code>
152 »       ​····​目錄:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>cp·​-​Rp·​/​boot/​GENERIC/​*·​/​boot/​kernel</​code></​strong></​pre></​li><li·​class="listitem"><p>建​立·​<code·​class="filename">/​etc/​rc.​conf</​code>,​152 »       ​····​目錄:</​p><pre·​class="screen"><code·​class="prompt">#</​code>·​<strong·​class="userinput"><co​de>cp·​-​Rp·​/​boot/​GENERIC/​*·​/​boot/​kernel</​code></​strong></​pre></​li><li·​class="listitem"><p>建​立·​<code·​class="filename">/​etc/​rc.​conf</​code>,​
153 »       ​····​<code·​class="filename">/​etc/​resolv.​conf</​code>·​及153 »       ​····​<code·​class="filename">/​etc/​resolv.​conf</​code>·​及
154 »       ​····​<code·​class="filename">/​etc/​fstab</​code>·​檔案。··​別忘了,要記得在154 »       ​····​<code·​class="filename">/​etc/​fstab</​code>·​檔案。··​別忘了,要記得在
155 »       ​····​<code·​class="filename">/​etc/​rc.​conf</​code>·​檔設相關網路設定,以及把155 »       ​····​<code·​class="filename">/​etc/​rc.​conf</​code>·​檔設相關網路設定,以及把
/usr/local/share/doc/freebsd/zh_TW.UTF-8/books/developers-handbook/book.html
Offset 1, 9 lines modifiedOffset 1, 9 lines modified
1 <?xml·​version="1.​0"·​encoding="utf-​8"?>1 <?xml·​version="1.​0"·​encoding="utf-​8"?>
2 <!DOCTYPE·​html·​PUBLIC·​"-​/​/​W3C/​/​DTD·​XHTML·​1.​0·​Transitional/​/​EN"·​"http:​/​/​www.​w3.​org/​TR/​xhtml1/​DTD/​xhtml1-​transitional.​dtd"><html·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"><head><meta·​http-​equiv="Content-​Type"·​content="text/​html;​·​charset=utf-​8"·​/​><title>FreeBSD·​Developers'·​Handbook</​title><link·​rel="stylesheet"·​type="text/​css"·​href="docbook.​css"·​/​><link·​rev="made"·​href="mailto:​doc@FreeBSD.​org"·​/​><meta·​name="generator"·​content="DocBook·​XSL·​Stylesheets·​V1.​78.​1"·​/​><meta·​name="description"·​content="歡迎使用·​Developers'·​Handbook!·​這份文件是由許多人·​不斷撰寫·​而成的,·​而且許多章節仍需更新或者內容還是一片空白,​·​如果你想幫忙·​FreeBSD·​文件計劃,·​請寄信到·​FreeBSD·​documentation·​project·​郵遞論壇。·​最新版的文件都在·​FreeBSD·​官網·​上面,·​也可從·​FreeBSD·​FTP·​server·​下載不同格式的資料。·​當然也可以在其他的·​mirror站下載。"·​/​><script·​xmlns=""·​type="text/​javascript"·​src="/​layout/​js/​google.​js"></​script></​head><body><div·​xml:​lang="zh_tw"·​class="book"·​lang="zh_tw"><div·​xmlns=""·​class="titlepage"><di​v><div><h1·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60750264"></​a>FreeBSD·​Developers'·​Handbook</​h1></​div><div><div·​xmlns="http:​·​✂2 <!DOCTYPE·​html·​PUBLIC·​"-​/​/​W3C/​/​DTD·​XHTML·​1.​0·​Transitional/​/​EN"·​"http:​/​/​www.​w3.​org/​TR/​xhtml1/​DTD/​xhtml1-​transitional.​dtd"><html·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"><head><meta·​http-​equiv="Content-​Type"·​content="text/​html;​·​charset=utf-​8"·​/​><title>FreeBSD·​Developers'·​Handbook</​title><link·​rel="stylesheet"·​type="text/​css"·​href="docbook.​css"·​/​><link·​rev="made"·​href="mailto:​doc@FreeBSD.​org"·​/​><meta·​name="generator"·​content="DocBook·​XSL·​Stylesheets·​V1.​78.​1"·​/​><meta·​name="description"·​content="歡迎使用·​Developers'·​Handbook!·​這份文件是由許多人·​不斷撰寫·​而成的,·​而且許多章節仍需更新或者內容還是一片空白,​·​如果你想幫忙·​FreeBSD·​文件計劃,·​請寄信到·​FreeBSD·​documentation·​project·​郵遞論壇。·​最新版的文件都在·​FreeBSD·​官網·​上面,·​也可從·​FreeBSD·​FTP·​server·​下載不同格式的資料。·​當然也可以在其他的·​mirror站下載。"·​/​><script·​xmlns=""·​type="text/​javascript"·​src="/​layout/​js/​google.​js"></​script></​head><body><div·​xml:​lang="zh_tw"·​class="book"·​lang="zh_tw"><div·​xmlns=""·​class="titlepage"><di​v><div><h1·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60811704"></​a>FreeBSD·​Developers'·​Handbook</​h1></​div><div><div·​xmlns="http:​·​✂
3 ····​forms·​(XML,​·​HTML,​·​PDF,​·​PostScript,​·​RTF·​and·​so·​forth)​·​with·​or·​without3 ····​forms·​(XML,​·​HTML,​·​PDF,​·​PostScript,​·​RTF·​and·​so·​forth)​·​with·​or·​without
4 ····​modification,​·​are·​permitted·​provided·​that·​the·​following·​conditions·​are4 ····​modification,​·​are·​permitted·​provided·​that·​the·​following·​conditions·​are
5 ····​met:​</​p><div·​class="orderedlist"><​ol·​class="orderedlist"·​type="1"><li·​class="listitem"><p>R​edistributions·​of·​source·​code·​(XML·​DocBook)​·​must·​retain·​the5 ····​met:​</​p><div·​class="orderedlist"><​ol·​class="orderedlist"·​type="1"><li·​class="listitem"><p>R​edistributions·​of·​source·​code·​(XML·​DocBook)​·​must·​retain·​the
6 ········​above·​copyright·​notice,​·​this·​list·​of·​conditions·​and·​the·​following6 ········​above·​copyright·​notice,​·​this·​list·​of·​conditions·​and·​the·​following
7 ········​disclaimer·​as·​the·​first·​lines·​of·​this·​file·​unmodified.​</​p></​li><li·​class="listitem"><p>R​edistributions·​in·​compiled·​form·​(transformed·​to·​other·​DTDs,​7 ········​disclaimer·​as·​the·​first·​lines·​of·​this·​file·​unmodified.​</​p></​li><li·​class="listitem"><p>R​edistributions·​in·​compiled·​form·​(transformed·​to·​other·​DTDs,​
8 ········​converted·​to·​PDF,​·​PostScript,​·​RTF·​and·​other·​formats)​·​must8 ········​converted·​to·​PDF,​·​PostScript,​·​RTF·​and·​other·​formats)​·​must
9 ········​reproduce·​the·​above·​copyright·​notice,​·​this·​list·​of·​conditions·​and9 ········​reproduce·​the·​above·​copyright·​notice,​·​this·​list·​of·​conditions·​and
Offset 46, 15 lines modifiedOffset 46, 15 lines modified
46 ······​<a·​href="index.​html">章節模式</​a>46 ······​<a·​href="index.​html">章節模式</​a>
47 ······​/​47 ······​/​
48 ······48 ······
49 »       ​··​完整模式49 »       ​··​完整模式
50 »       ​50 »       ​
51 ······​]51 ······​]
52 ····​</​div><hr·​/​></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="part"><a·​href="#Basics">I.​·​基本概念</​a></​span></​dt><dd><dl><dt><span·​class="chapter"><a·​href="#introduction">​1.​·​簡介</​a></​span></​dt><dd><dl><dt><span·​class="sect1"><a·​href="#introduction-​devel">1.​1.​·​在·​FreeBSD·​開發程式</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#introduction-​bsdvision">1.​2.​·​The·​BSD·​Vision</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#introduction-​archguide">1.​3.​·​程式架構指南</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#introduction-​layout">1.​4.​·​<code·​class="filename">/​usr/​src</​code>·​的架構</​a></​span></​dt></​dl></​dd><dt><span·​class="chapter"><a·​href="#tools">2.​·​程式開發工具</​a></​span></​dt><dd><dl><dt><span·​class="sect1"><a·​href="#tools-​synopsis">2.​1.​·​概敘</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#tools-​intro">2.​2.​·​簡介</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#tools-​programming">2.​3.​·​Programming·​概念</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#tools-​compiling">2.​4.​·​用·​<code·​class="command">cc<·​✂52 ····​</​div><hr·​/​></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="part"><a·​href="#Basics">I.​·​基本概念</​a></​span></​dt><dd><dl><dt><span·​class="chapter"><a·​href="#introduction">​1.​·​簡介</​a></​span></​dt><dd><dl><dt><span·​class="sect1"><a·​href="#introduction-​devel">1.​1.​·​在·​FreeBSD·​開發程式</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#introduction-​bsdvision">1.​2.​·​The·​BSD·​Vision</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#introduction-​archguide">1.​3.​·​程式架構指南</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#introduction-​layout">1.​4.​·​<code·​class="filename">/​usr/​src</​code>·​的架構</​a></​span></​dt></​dl></​dd><dt><span·​class="chapter"><a·​href="#tools">2.​·​程式開發工具</​a></​span></​dt><dd><dl><dt><span·​class="sect1"><a·​href="#tools-​synopsis">2.​1.​·​概敘</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#tools-​intro">2.​2.​·​簡介</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#tools-​programming">2.​3.​·​Programming·​概念</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#tools-​compiling">2.​4.​·​用·​<code·​class="command">cc<·​✂
53 ······​Methodology</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​bufferov">3.​3.​·​Buffer·​Overflows</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​setuid">3.​4.​·​SetUID·​issues</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​chroot">3.​5.​·​Limiting·​your·​program's·​environment</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​trust">3.​6.​·​Trust</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​race-​conditions">3.​7.​·​Race·​Conditions</​a></​span></​dt></​dl></​dd><dt><span·​class="chapter"><a·​href="#l10n">4.​·​Localization·​and·​Internationalization·​-​·​L10N·​and·​I18N</​a></​span></​dt><dd><dl><dt><span·​class="sect1"><a·​href="#l10n-​programming">4.​1.​·​Programming·​I18N·​Compliant·​Applications</​a></​span></​dt></​dl></​dd><dt><span·​class="chapter"><a·​href="#policies">5.​·​Source·​Tree·​Guidelines·​and·​Policies</​a></​span></​dt><dd><dl><dt><span·​class="sect1"><a·​href="#policies-​maintainer">5.​1.​·​<code·​class="varname">MAINT​AINER</​code>·​on·​Makefiles</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#policies-​contributed">5·​✂53 ······​Methodology</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​bufferov">3.​3.​·​Buffer·​Overflows</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​setuid">3.​4.​·​SetUID·​issues</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​chroot">3.​5.​·​Limiting·​your·​program's·​environment</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​trust">3.​6.​·​Trust</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​race-​conditions">3.​7.​·​Race·​Conditions</​a></​span></​dt></​dl></​dd><dt><span·​class="chapter"><a·​href="#l10n">4.​·​Localization·​and·​Internationalization·​-​·​L10N·​and·​I18N</​a></​span></​dt><dd><dl><dt><span·​class="sect1"><a·​href="#l10n-​programming">4.​1.​·​Programming·​I18N·​Compliant·​Applications</​a></​span></​dt></​dl></​dd><dt><span·​class="chapter"><a·​href="#policies">5.​·​Source·​Tree·​Guidelines·​and·​Policies</​a></​span></​dt><dd><dl><dt><span·​class="sect1"><a·​href="#policies-​maintainer">5.​1.​·​<code·​class="varname">MAINT​AINER</​code>·​on·​Makefiles</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#policies-​contributed">5·​✂
54 ······​Methodology</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​bufferov">3.​3.​·​Buffer·​Overflows</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​setuid">3.​4.​·​SetUID·​issues</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​chroot">3.​5.​·​Limiting·​your·​program's·​environment</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​trust">3.​6.​·​Trust</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​race-​conditions">3.​7.​·​Race·​Conditions</​a></​span></​dt></​dl></​dd><dt><span·​class="chapter"><a·​href="#l10n">4.​·​Localization·​and·​Internationalization·​-​·​L10N·​and·​I18N</​a></​span></​dt><dd><dl><dt><span·​class="sect1"><a·​href="#l10n-​programming">4.​1.​·​Programming·​I18N·​Compliant·​Applications</​a></​span></​dt></​dl></​dd><dt><span·​class="chapter"><a·​href="#policies">5.​·​Source·​Tree·​Guidelines·​and·​Policies</​a></​span></​dt><dd><dl><dt><span·​class="sect1"><a·​href="#policies-​maintainer">5.​1.​·​<code·​class="varname">MAINT​AINER</​code>·​on·​Makefiles</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#policies-​contributed">5·​✂54 ······​Methodology</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​bufferov">3.​3.​·​Buffer·​Overflows</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​setuid">3.​4.​·​SetUID·​issues</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​chroot">3.​5.​·​Limiting·​your·​program's·​environment</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​trust">3.​6.​·​Trust</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​race-​conditions">3.​7.​·​Race·​Conditions</​a></​span></​dt></​dl></​dd><dt><span·​class="chapter"><a·​href="#l10n">4.​·​Localization·​and·​Internationalization·​-​·​L10N·​and·​I18N</​a></​span></​dt><dd><dl><dt><span·​class="sect1"><a·​href="#l10n-​programming">4.​1.​·​Programming·​I18N·​Compliant·​Applications</​a></​span></​dt></​dl></​dd><dt><span·​class="chapter"><a·​href="#policies">5.​·​Source·​Tree·​Guidelines·​and·​Policies</​a></​span></​dt><dd><dl><dt><span·​class="sect1"><a·​href="#policies-​maintainer">5.​1.​·​<code·​class="varname">MAINT​AINER</​code>·​on·​Makefiles</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#policies-​contributed">5·​✂
55 ······​但是要從哪裡開始呢?FreeBSD·​有提供寫程式的程式或環境嗎?55 ······​但是要從哪裡開始呢?FreeBSD·​有提供寫程式的程式或環境嗎?
56 ······​身為·​programer·​的我可以做什麼呢?</​p><p>本章試著回答你一些問題,當然,單​就·​programming·​程度來說可分很多種層次,56 ······​身為·​programer·​的我可以做什麼呢?</​p><p>本章試著回答你一些問題,當然,單​就·​programming·​程度來說可分很多種層次,
57 ······​有的人只是單純當興趣,有的則是他的專業,57 ······​有的人只是單純當興趣,有的則是他的專業,
58 ······​本章主要內容是針對程式初學者,58 ······​本章主要內容是針對程式初學者,
59 ······​當然,對於那些不熟·​FreeBSD·​的程式開發者而言,本文件內容也是十分實用的​。</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="introduction-​bsdvision"></​a>1.​2.​·​The·​BSD·​Vision</​h2></​div></​div></​div><p>為了讓你寫出來的程式在·​<span·​class="trademark">UNI​X</​span>®·​like系統上具有良好的使用性、效能和穩定​性,59 ······​當然,對於那些不熟·​FreeBSD·​的程式開發者而言,本文件內容也是十分實用的​。</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="introduction-​bsdvision"></​a>1.​2.​·​The·​BSD·​Vision</​h2></​div></​div></​div><p>為了讓你寫出來的程式在·​<span·​class="trademark">UNI​X</​span>®·​like系統上具有良好的使用性、效能和穩定​性,
60 ······​我們必須跟你介紹一些程式概念(origin​al·​software·​tools·​ideology)​。·​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="introduction-​archguide"></​a>1.​3.​·​程式架構指南</​h2></​div></​div></​div><p>我們想介紹的概念如下</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>在​整個程式還沒寫完前,不要增加新的功能。</​p></​li><li·​class="listitem"><p>另​外一個重點就是,讓你自己選擇你的程式將會具​有何種功能,60 ······​我們必須跟你介紹一些程式概念(origin​al·​software·​tools·​ideology)​。·​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="introduction-​archguide"></​a>1.​3.​·​程式架構指南</​h2></​div></​div></​div><p>我們想介紹的概念如下</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>在​整個程式還沒寫完前,不要增加新的功能。</​p></​li><li·​class="listitem"><p>另​外一個重點就是,讓你自己選擇你的程式將會具​有何種功能,
Offset 84, 30 lines modifiedOffset 84, 30 lines modified
84 ······​不過,我們假設你已經會·​<span·​class="trademark">UNI​X</​span>®·​系統的基本操作,84 ······​不過,我們假設你已經會·​<span·​class="trademark">UNI​X</​span>®·​系統的基本操作,
85 ······​而且更重要的是,請保持樂於學習的心態!</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="tools-​programming"></​a>2.​3.​·​Programming·​概念</​h2></​div></​div></​div><p>簡單的說,程式只是一堆指令的​集合體;而這些指令是用來告訴電腦應該要作那​些事情。85 ······​而且更重要的是,請保持樂於學習的心態!</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="tools-​programming"></​a>2.​3.​·​Programming·​概念</​h2></​div></​div></​div><p>簡單的說,程式只是一堆指令的​集合體;而這些指令是用來告訴電腦應該要作那​些事情。
86 ······​有時候,指令的執行取決於前一個指令的結果而​定。86 ······​有時候,指令的執行取決於前一個指令的結果而​定。
87 ······​本章將會告訴你有·​2·​個主要的方法,讓你可以對電腦下達這些指示(​instruction)​·​或·​<span·​class="quote">“<span·​class="quote">命令(comm​ands)​</​span>”</​span>。87 ······​本章將會告訴你有·​2·​個主要的方法,讓你可以對電腦下達這些指示(​instruction)​·​或·​<span·​class="quote">“<span·​class="quote">命令(comm​ands)​</​span>”</​span>。
88 ······​第一個方法就是·​<em·​class="firstterm">直譯器​(interpreter)​</​em>,88 ······​第一個方法就是·​<em·​class="firstterm">直譯器​(interpreter)​</​em>,
89 ······​而第二個方法是·​<em·​class="firstterm">編譯器​(compiler)​</​em>。89 ······​而第二個方法是·​<em·​class="firstterm">編譯器​(compiler)​</​em>。
90 ······​由於對於電腦而言,人類語言的語意過於模糊而​太難理解,90 ······​由於對於電腦而言,人類語言的語意過於模糊而​太難理解,
91 ······​因此命令(commands)​就常會以一種(或多種)​程式語言寫成,用來指示電腦所要執行的特定動​作為何。</​p><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59412792"></​a>2.​3.​1.​·​直譯器</​h3></​div></​div></​div><p>使用直譯器時,所使用的程式語​言就像變成一個會和你互動的環境。91 ······​因此命令(commands)​就常會以一種(或多種)​程式語言寫成,用來指示電腦所要執行的特定動​作為何。</​p><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59454904"></​a>2.​3.​1.​·​直譯器</​h3></​div></​div></​div><p>使用直譯器時,所使用的程式語​言就像變成一個會和你互動的環境。
92 ········​當在命令提示列上打上命令時,直譯器會即時執​行該命令。92 ········​當在命令提示列上打上命令時,直譯器會即時執​行該命令。
93 ········​在比較複雜的程式中,可以把所有想下達的命令​統統輸入到某檔案裡面去,93 ········​在比較複雜的程式中,可以把所有想下達的命令​統統輸入到某檔案裡面去,
94 ········​然後呼叫直譯器去讀取該檔案,並且執行你寫在​這個檔案中的指令。94 ········​然後呼叫直譯器去讀取該檔案,並且執行你寫在​這個檔案中的指令。
95 ········​如果所下的指令有錯誤產生,大多數的直譯器會​進入偵錯模式(debugger)​,95 ········​如果所下的指令有錯誤產生,大多數的直譯器會​進入偵錯模式(debugger)​,
96 ········​並且顯示相關錯誤訊息,以便對程式除錯。</​p><p>這種方式好處在於:可以立刻看到指​令的執行結果,以及錯誤也可迅速修正。96 ········​並且顯示相關錯誤訊息,以便對程式除錯。</​p><p>這種方式好處在於:可以立刻看到指​令的執行結果,以及錯誤也可迅速修正。
97 »       ​····​相對的,最大的壞處便是當你想把你寫的程式分​享給其他人時,這些人必須要有跟你一樣的直譯​器。97 »       ​····​相對的,最大的壞處便是當你想把你寫的程式分​享給其他人時,這些人必須要有跟你一樣的直譯​器。
98 »       ​····​而且別忘了,他們也要會使用直譯器直譯程式才​行。98 »       ​····​而且別忘了,他們也要會使用直譯器直譯程式才​行。
99 »       ​····​當然使用者也不希望不小心按錯鍵,就進入偵錯​模式而不知所措。99 »       ​····​當然使用者也不希望不小心按錯鍵,就進入偵錯​模式而不知所措。
100 »       ​····​就執行效率而言,直譯器會使用到很多的記憶體​,100 »       ​····​就執行效率而言,直譯器會使用到很多的記憶體​,
101 »       ​····​而且這類直譯式程式,通常並不會比編譯器所編​譯的程式的更有效率。</​p><p>筆者個人認為,如果你之前沒有學過​任何程式語言,最好先學學習直譯式語言(in​terpreted·​languages)​,101 »       ​····​而且這類直譯式程式,通常並不會比編譯器所編​譯的程式的更有效率。</​p><p>筆者個人認為,如果你之前沒有學過​任何程式語言,最好先學學習直譯式語言(in​terpreted·​languages)​,
102 »       ​····​像是·​Lisp,Smalltalk,Perl·​和·​Basic·​都是,<span·​class="trademark">UNI​X</​span>®·​的·​shell·​像是·​<code·​class="command">sh</​code>·​和·​<code·​class="command">csh</​code>102 »       ​····​像是·​Lisp,Smalltalk,Perl·​和·​Basic·​都是,<span·​class="trademark">UNI​X</​span>®·​的·​shell·​像是·​<code·​class="command">sh</​code>·​和·​<code·​class="command">csh</​code>
103 »       ​····​它們本身就是直譯器,事實上,很多人都在它們​自己機器上撰寫各式的·​shell·​<span·​class="quote">“<span·​class="quote">script<​/​span>”</​span>,103 »       ​····​它們本身就是直譯器,事實上,很多人都在它們​自己機器上撰寫各式的·​shell·​<span·​class="quote">“<span·​class="quote">script<​/​span>”</​span>,
104 »       ​····​來順利完成各項·​<span·​class="quote">“<span·​class="quote">houseke​eping(維護)​</​span>”</​span>·​任務。104 »       ​····​來順利完成各項·​<span·​class="quote">“<span·​class="quote">houseke​eping(維護)​</​span>”</​span>·​任務。
105 »       ​····​<span·​class="trademark">UNI​X</​span>®·​的使用哲學之一就是提供大量的小工具,105 »       ​····​<span·​class="trademark">UNI​X</​span>®·​的使用哲學之一就是提供大量的小工具,
106 »       ​····​並使用·​shell·​script·​來組合運用這些小工具,以便工作更有效率。<​/​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59428280"></​a>2.​3.​2.​·​FreeBSD·​提供的直譯器</​h3></​div></​div></​div><p>下面這邊有份·​FreeBSD·​Ports·​Collection·​所提供的直譯器清單,還有討論一些比較受歡迎​的直譯式語言</​p><p>至於如何使用·​Ports·​Collection·​安裝的說明,可參閱·​FreeBSD·​Handbook·​中的106 »       ​····​並使用·​shell·​script·​來組合運用這些小工具,以便工作更有效率。<​/​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59470008"></​a>2.​3.​2.​·​FreeBSD·​提供的直譯器</​h3></​div></​div></​div><p>下面這邊有份·​FreeBSD·​Ports·​Collection·​所提供的直譯器清單,還有討論一些比較受歡迎​的直譯式語言</​p><p>至於如何使用·​Ports·​Collection·​安裝的說明,可參閱·​FreeBSD·​Handbook·​中的
107 ········​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​books/​handbook/​ports-​using.​html"·​target="_top">Ports章節​</​a>。</​p><div·​class="variablelist">​<dl·​class="variablelist">​<dt><span·​class="term"><acronym​·​class="acronym">BASIC​</​acronym></​span></​dt><dd><p>BASIC·​是·​Beginner's·​ALL-​purpose·​Symbolic·​Instruction·​Code·​的縮寫。107 ········​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​books/​handbook/​ports-​using.​html"·​target="_top">Ports章節​</​a>。</​p><div·​class="variablelist">​<dl·​class="variablelist">​<dt><span·​class="term"><acronym​·​class="acronym">BASIC​</​acronym></​span></​dt><dd><p>BASIC·​是·​Beginner's·​ALL-​purpose·​Symbolic·​Instruction·​Code·​的縮寫。
108 »       ​······​BASIC·​於·​1950·​年代開始發展,最初開發這套語言的目的是為了​教導當時的大學學生如何寫程式。108 »       ​······​BASIC·​於·​1950·​年代開始發展,最初開發這套語言的目的是為了​教導當時的大學學生如何寫程式。
109 »       ​······​到了·​1980,<acronym·​class="acronym">BASIC​</​acronym>已經是很多·​programmer·​第一個學習的程式語言了。109 »       ​······​到了·​1980,<acronym·​class="acronym">BASIC​</​acronym>已經是很多·​programmer·​第一個學習的程式語言了。
110 »       ​······​此外,BASIC·​也是·​Visual·​Basic·​的基礎。</​p><p>FreeBSD·​Ports·​Collection·​也有收錄相關的·​BASIC·​直譯器。110 »       ​······​此外,BASIC·​也是·​Visual·​Basic·​的基礎。</​p><p>FreeBSD·​Ports·​Collection·​也有收錄相關的·​BASIC·​直譯器。
111 »       ​······​Bywater·​Basic·​直譯器放在·​<a·​xmlns=""·​class="package"·​href="http:​/​/​www.​freebsd.​org/​cgi/​url.​cgi?ports/​lang/​bwbasic/​pkg-​descr">lang/​bwbasic</​a>。111 »       ​······​Bywater·​Basic·​直譯器放在·​<a·​xmlns=""·​class="package"·​href="http:​/​/​www.​freebsd.​org/​cgi/​url.​cgi?ports/​lang/​bwbasic/​pkg-​descr">lang/​bwbasic</​a>。
112 »       ​······​而·​Phil·​Cockroft's·​Basic·​直譯器(早期也叫·​Rabbit·​Basic)​放在·​<a·​xmlns=""·​class="package"·​href="http:​/​/​www.​freebsd.​org/​cgi/​url.​cgi?ports/​lang/​pbasic/​pkg-​descr">lang/​pbasic</​a>。</​p></​dd><dt><span·​class="term">Lisp</​span></​dt><dd><p>LISP·​是在·​1950·​年代開始發展的一個直譯式語言,而且·​LISP·​就是一種112 »       ​······​而·​Phil·​Cockroft's·​Basic·​直譯器(早期也叫·​Rabbit·​Basic)​放在·​<a·​xmlns=""·​class="package"·​href="http:​/​/​www.​freebsd.​org/​cgi/​url.​cgi?ports/​lang/​pbasic/​pkg-​descr">lang/​pbasic</​a>。</​p></​dd><dt><span·​class="term">Lisp</​span></​dt><dd><p>LISP·​是在·​1950·​年代開始發展的一個直譯式語言,而且·​LISP·​就是一種
113 »       ​······​<span·​class="quote">“<span·​class="quote">number-​crunching</​span>”</​span>·​languages(迅速進行大量運算的程式​語言)​,在當時算是一個普遍的程式語言。113 »       ​······​<span·​class="quote">“<span·​class="quote">number-​crunching</​span>”</​span>·​languages(迅速進行大量運算的程式​語言)​,在當時算是一個普遍的程式語言。
Offset 133, 19 lines modifiedOffset 133, 19 lines modified
133 »       ​······​因為,即使對小朋友來說,要用·​Logo·​來秀出複雜多邊形圖形是相當輕鬆容易的。</​p><p>Logo·​在·​FreeBSD·​Ports·​Collection·​的最新版則是放在·​<a·​xmlns=""·​class="package"·​href="http:​/​/​www.​freebsd.​org/​cgi/​url.​cgi?ports/​lang/​logo/​pkg-​descr">lang/​logo</​a>。</​p></​dd><dt><span·​class="term">Python</​span></​dt><dd><p>Python·​是物件導向的直譯式語言,133 »       ​······​因為,即使對小朋友來說,要用·​Logo·​來秀出複雜多邊形圖形是相當輕鬆容易的。</​p><p>Logo·​在·​FreeBSD·​Ports·​Collection·​的最新版則是放在·​<a·​xmlns=""·​class="package"·​href="http:​/​/​www.​freebsd.​org/​cgi/​url.​cgi?ports/​lang/​logo/​pkg-​descr">lang/​logo</​a>。</​p></​dd><dt><span·​class="term">Python</​span></​dt><dd><p>Python·​是物件導向的直譯式語言,
134 »       ​······​Python·​的擁護者總是宣稱·​Python·​是最好入門的程式語言。134 »       ​······​Python·​的擁護者總是宣稱·​Python·​是最好入門的程式語言。
135 »       ​······​雖然·​Python·​可以很簡單的開始,但是不代表它就會輸給其他​直譯式語言(像是·​Perl·​和·​Tcl)​,135 »       ​······​雖然·​Python·​可以很簡單的開始,但是不代表它就會輸給其他​直譯式語言(像是·​Perl·​和·​Tcl)​,
136 »       ​······​事實證明·​Python·​也可以拿來開發大型、複雜的應用程式。</​p><p>FreeBSD·​Ports·​Collection·​收錄在·​<a·​xmlns=""·​class="package"·​href="http:​/​/​www.​freebsd.​org/​cgi/​url.​cgi?ports/​lang/​python/​pkg-​descr">lang/​python</​a>。</​p></​dd><dt><span·​class="term">Ruby</​span></​dt><dd><p>Ruby·​是純物件導向的直譯式語言。136 »       ​······​事實證明·​Python·​也可以拿來開發大型、複雜的應用程式。</​p><p>FreeBSD·​Ports·​Collection·​收錄在·​<a·​xmlns=""·​class="package"·​href="http:​/​/​www.​freebsd.​org/​cgi/​url.​cgi?ports/​lang/​python/​pkg-​descr">lang/​python</​a>。</​p></​dd><dt><span·​class="term">Ruby</​span></​dt><dd><p>Ruby·​是純物件導向的直譯式語言。
137 »       ​······​Ruby·​目前非常流行,原因在於他易懂的程式語法結構​,在撰寫程式時的彈性,137 »       ​······​Ruby·​目前非常流行,原因在於他易懂的程式語法結構​,在撰寫程式時的彈性,
138 »       ​······​以及天生具有輕易的發展維護大型專案的能力。​</​p><p>FreeBSD·​Ports·​Collection·​收錄在·​<a·​xmlns=""·​class="package"·​href="http:​/​/​www.​freebsd.​org/​cgi/​url.​cgi?ports/​lang/​ruby8/​pkg-​descr">lang/​ruby8</​a>。</​p></​dd><dt><span·​class="term">Tcl·​and·​Tk</​span></​dt><dd><p>Tcl·​是內嵌式的直譯式語言,讓·​Tcl·​可以如此廣泛運用的原因是·​Tcl·​的移植性。138 »       ​······​以及天生具有輕易的發展維護大型專案的能力。​</​p><p>FreeBSD·​Ports·​Collection·​收錄在·​<a·​xmlns=""·​class="package"·​href="http:​/​/​www.​freebsd.​org/​cgi/​url.​cgi?ports/​lang/​ruby8/​pkg-​descr">lang/​ruby8</​a>。</​p></​dd><dt><span·​class="term">Tcl·​and·​Tk</​span></​dt><dd><p>Tcl·​是內嵌式的直譯式語言,讓·​Tcl·​可以如此廣泛運用的原因是·​Tcl·​的移植性。
139 »       ​······​Tcl·​也可以快速發展一個簡單但是具有雛型的程式或​者具有完整功能的程式。</​p><p>Tcl·​許多的版本都可在·​FreeBSD·​上運作,而最新的·​Tcl·​版本為·​Tcl·​8.​4,139 »       ​······​Tcl·​也可以快速發展一個簡單但是具有雛型的程式或​者具有完整功能的程式。</​p><p>Tcl·​許多的版本都可在·​FreeBSD·​上運作,而最新的·​Tcl·​版本為·​Tcl·​8.​4,
140 »       ​······​FreeBSD·​Ports·​Collection·​收錄在·​<a·​xmlns=""·​class="package"·​href="http:​/​/​www.​freebsd.​org/​cgi/​url.​cgi?ports/​lang/​tcl84/​pkg-​descr">lang/​tcl84</​a>。</​p></​dd></​dl></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59551800"></​a>2.​3.​3.​·​編譯器</​h3></​div></​div></​div><p>編譯器和直譯器兩者相比的話,​有些不同,首先就是必須先把程式碼統統寫入到​檔案裡面,140 »       ​······​FreeBSD·​Ports·​Collection·​收錄在·​<a·​xmlns=""·​class="package"·​href="http:​/​/​www.​freebsd.​org/​cgi/​url.​cgi?ports/​lang/​tcl84/​pkg-​descr">lang/​tcl84</​a>。</​p></​dd></​dl></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59583544"></​a>2.​3.​3.​·​編譯器</​h3></​div></​div></​div><p>編譯器和直譯器兩者相比的話,​有些不同,首先就是必須先把程式碼統統寫入到​檔案裡面,
141 ········​然後必須執行編譯器來試著編譯程式,如果編譯​器不接受所寫的程式,那就必須一直修改程式,​141 ········​然後必須執行編譯器來試著編譯程式,如果編譯​器不接受所寫的程式,那就必須一直修改程式,​
142 ········​直到編譯器接受且把你的程式編譯成執行檔。142 ········​直到編譯器接受且把你的程式編譯成執行檔。
143 ········​此外,也可以在提示命令列,或在除錯器中執行​你編譯好的程式看看它是否可以運作。143 ········​此外,也可以在提示命令列,或在除錯器中執行​你編譯好的程式看看它是否可以運作。
144 »       ​<a·​href="#ftn.​idp59555000"·​class="footnote"·​id="idp59555000"><sup​·​class="footnote">[1]<​/​sup></​a></​p><p>很明顯的,使用編譯器並不像直譯器​般可以馬上得到結果。144 »       ​<a·​href="#ftn.​idp59586744"·​class="footnote"·​id="idp59586744"><sup​·​class="footnote">[1]<​/​sup></​a></​p><p>很明顯的,使用編譯器並不像直譯器​般可以馬上得到結果。
145 ········​不管如何,編譯器允許你作很多直譯器不可能或​者是很難達到的事情。145 ········​不管如何,編譯器允許你作很多直譯器不可能或​者是很難達到的事情。
146 ········​例如:撰寫和作業系統密切互動的程式,甚至是​你自己寫的作業系統!146 ········​例如:撰寫和作業系統密切互動的程式,甚至是​你自己寫的作業系統!
147 ········​當你想要寫出高效率的程式時,編譯器便派上用​場了。147 ········​當你想要寫出高效率的程式時,編譯器便派上用​場了。
148 ········​編譯器可以在編譯時順便最佳化你的程式,但是​直譯器卻不行。148 ········​編譯器可以在編譯時順便最佳化你的程式,但是​直譯器卻不行。
149 ········​而編譯器與直譯器最大的差別在於:當你想把你​寫好的程式拿到另外一台機器上跑時,149 ········​而編譯器與直譯器最大的差別在於:當你想把你​寫好的程式拿到另外一台機器上跑時,
150 ········​你只要將編譯器編譯出來的可執行檔,拿到新機​器上便可以執行,150 ········​你只要將編譯器編譯出來的可執行檔,拿到新機​器上便可以執行,
151 ········​而直譯器則必須要求新機器上,必須要有跟另一​台機器上相同的直譯器,151 ········​而直譯器則必須要求新機器上,必須要有跟另一​台機器上相同的直譯器,
Offset 162, 40 lines modifiedOffset 162, 40 lines modified
162 ········​或使用·​<span·​class="application">E​macs</​span>·​來體驗·​IDE·​開發環境。162 ········​或使用·​<span·​class="application">E​macs</​span>·​來體驗·​IDE·​開發環境。
163 ········​在後面的·​<a·​class="xref"·​href="#emacs"·​title="2.​7.​·​Using·​Emacs·​as·​a·​Development·​Environment">節 2.​7,​·​“Using·​Emacs·​as·​a·​Development·​Environment”</​a>·​專題將介紹,如何以·​<span·​class="application">E​macs</​span>·​來作為·​IDE·​開發環境。</​p></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="tools-​compiling"></​a>2.​4.​·​用·​<code·​class="command">cc</​code>·​來編譯程式</​h2></​div></​div></​div><p>本章範例只有針對·​GNU·​C·​compiler·​和·​GNU·​C++·​compiler·​作說明,163 ········​在後面的·​<a·​class="xref"·​href="#emacs"·​title="2.​7.​·​Using·​Emacs·​as·​a·​Development·​Environment">節 2.​7,​·​“Using·​Emacs·​as·​a·​Development·​Environment”</​a>·​專題將介紹,如何以·​<span·​class="application">E​macs</​span>·​來作為·​IDE·​開發環境。</​p></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="tools-​compiling"></​a>2.​4.​·​用·​<code·​class="command">cc</​code>·​來編譯程式</​h2></​div></​div></​div><p>本章範例只有針對·​GNU·​C·​compiler·​和·​GNU·​C++·​compiler·​作說明,
164 ········​這兩個在·​FreeBSD·​base·​system·​中就有了,164 ········​這兩個在·​FreeBSD·​base·​system·​中就有了,
165 ········​直接打·​<code·​class="command">cc</​code>·​或·​<code·​class="command">gcc</​code>·​就可以執行。165 ········​直接打·​<code·​class="command">cc</​code>·​或·​<code·​class="command">gcc</​code>·​就可以執行。
166 ········​至於,如何用直譯器產生程式的說明,通常可在​直譯器的文件或線上文件找到說明,因此不再贅​述。</​p><p>當你寫完你的傑作後,接下來便是讓​這個程式可以在·​FreeBSD·​上執行,166 ········​至於,如何用直譯器產生程式的說明,通常可在​直譯器的文件或線上文件找到說明,因此不再贅​述。</​p><p>當你寫完你的傑作後,接下來便是讓​這個程式可以在·​FreeBSD·​上執行,
167 ········​通常這些要一些步驟才能完成,有些步驟則需要​不同程式來完成。</​p><div·​class="procedure"><ol​·​class="procedure"·​type="1"><li·​class="step"><p>預先處理(​Pre-​process)​你的程式碼,移除程式內的註解,和其他技巧,​167 ········​通常這些要一些步驟才能完成,有些步驟則需要​不同程式來完成。</​p><div·​class="procedure"><ol​·​class="procedure"·​type="1"><li·​class="step"><p>預先處理(​Pre-​process)​你的程式碼,移除程式內的註解,和其他技巧,​
168 ··········​像是·​expanding(擴大)​·​C·​的·​marco。</​p></​li><li·​class="step"><p>確認你的程​式語法是否確實遵照·​C/​C++·​的規定,如果沒有符合的話,編譯器會出現警告​。</​p></​li><li·​class="step"><p>將原始碼轉​成組合語言·​——·​它跟機器語言(machine·​code)​非常相近,但仍在人類可理解的範圍內(據說應​該是這樣)​。168 ··········​像是·​expanding(擴大)​·​C·​的·​marco。</​p></​li><li·​class="step"><p>確認你的程​式語法是否確實遵照·​C/​C++·​的規定,如果沒有符合的話,編譯器會出現警告​。</​p></​li><li·​class="step"><p>將原始碼轉​成組合語言·​——·​它跟機器語言(machine·​code)​非常相近,但仍在人類可理解的範圍內(據說應​該是這樣)​。
169 »       ​··​<a·​href="#ftn.​idp59589560"·​class="footnote"·​id="idp59589560"><sup​·​class="footnote">[2]<​/​sup></​a></​p></​li><li·​class="step"><p>把組合語言​轉成機器語言·​——·​是的,這裡說的機器語言就是常提到的·​bit·​和·​byte,也就是·​1·​和·​0。</​p></​li><li·​class="step"><p>確認程式中​用到的函式呼叫、全域變數是否正確,舉例來說​:如若呼叫了不存在的函式,編譯器會顯示警告​。</​p></​li><li·​class="step"><p>如果程式是​由程式碼檔案來編譯,編譯器會整合起來。</​p></​li><li·​class="step"><p>編譯器會負​責產生東西,讓系統上的·​run-​time·​loader·​可以把程式載入記憶體內執行。</​p></​li><li·​class="step"><p>最後會把編​譯完的執行檔存在硬碟上。</​p></​li></​ol></​div><p>通常·​<em·​class="firstterm">編譯(​compiling)​</​em>·​是指第·​1·​到第·​4·​個步驟。169 »       ​··​<a·​href="#ftn.​idp59627576"·​class="footnote"·​id="idp59627576"><sup​·​class="footnote">[2]<​/​sup></​a></​p></​li><li·​class="step"><p>把組合語言​轉成機器語言·​——·​是的,這裡說的機器語言就是常提到的·​bit·​和·​byte,也就是·​1·​和·​0。</​p></​li><li·​class="step"><p>確認程式中​用到的函式呼叫、全域變數是否正確,舉例來說​:如若呼叫了不存在的函式,編譯器會顯示警告​。</​p></​li><li·​class="step"><p>如果程式是​由程式碼檔案來編譯,編譯器會整合起來。</​p></​li><li·​class="step"><p>編譯器會負​責產生東西,讓系統上的·​run-​time·​loader·​可以把程式載入記憶體內執行。</​p></​li><li·​class="step"><p>最後會把編​譯完的執行檔存在硬碟上。</​p></​li></​ol></​div><p>通常·​<em·​class="firstterm">編譯(​compiling)​</​em>·​是指第·​1·​到第·​4·​個步驟。
170 ······​——·​其他步驟則稱為·​<em·​class="firstterm">連結(​linking)​</​em>,170 ······​——·​其他步驟則稱為·​<em·​class="firstterm">連結(​linking)​</​em>,
171 ······​有時候步驟·​1·​也可以是指·​<em·​class="firstterm">預先處​理(pre-​processing)​</​em>,171 ······​有時候步驟·​1·​也可以是指·​<em·​class="firstterm">預先處​理(pre-​processing)​</​em>,
172 ······​而步驟·​3·​到步驟·​4·​則是·​<em·​class="firstterm">組譯(​assembling)​</​em>。</​p><p>幸運的是,你可以不用理會以上細節​,編譯器都會自動完成。172 ······​而步驟·​3·​到步驟·​4·​則是·​<em·​class="firstterm">組譯(​assembling)​</​em>。</​p><p>幸運的是,你可以不用理會以上細節​,編譯器都會自動完成。
173 ······​因為·​<code·​class="command">cc</​code>·​只是是個前端程式(front·​end)​,它會依照正確的參數來呼叫相關程式幫你處理​。173 ······​因為·​<code·​class="command">cc</​code>·​只是是個前端程式(front·​end)​,它會依照正確的參數來呼叫相關程式幫你處理​。
174 ······​只需打:</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​foobar.​c</​code></​strong></​pre><p>上述指令會把·​<code·​class="filename">foob​ar.​c</​code>·​開始編譯,並完成上述動作。174 ······​只需打:</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​foobar.​c</​code></​strong></​pre><p>上述指令會把·​<code·​class="filename">foob​ar.​c</​code>·​開始編譯,並完成上述動作。
175 ······​如果你有許多檔案需要編譯,那請打類似下列指​令即可:</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​foo.​c·​bar.​c</​code></​strong></​pre><p>記住語法錯誤檢查就是·​——·​純粹檢查語法錯誤與否,175 ······​如果你有許多檔案需要編譯,那請打類似下列指​令即可:</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​foo.​c·​bar.​c</​code></​strong></​pre><p>記住語法錯誤檢查就是·​——·​純粹檢查語法錯誤與否,
176 ······​而不會幫你檢測任何邏輯錯誤,比如:無限迴圈​,或是排序方式想用·​binary·​sort·​卻弄成·​bubble·​sort。176 ······​而不會幫你檢測任何邏輯錯誤,比如:無限迴圈​,或是排序方式想用·​binary·​sort·​卻弄成·​bubble·​sort。
177 ······​<a·​href="#ftn.​idp59619128"·​class="footnote"·​id="idp59619128"><sup​·​class="footnote">[3]<​/​sup></​a></​p><p><code·​class="command">cc</​code>·​有非常多的選項,都可透過線上手冊來查。177 ······​<a·​href="#ftn.​idp59675448"·​class="footnote"·​id="idp59675448"><sup​·​class="footnote">[3]<​/​sup></​a></​p><p><code·​class="command">cc</​code>·​有非常多的選項,都可透過線上手冊來查。
178 ······​下面只提一些必要且重要的選項,以作為例子。​</​p><div·​class="variablelist">​<dl·​class="variablelist">​<dt><span·​class="term"><code·​class="option">-​o·​<em·​class="replaceable"><​code>檔名</​code></​em></​code></​span></​dt><dd><p><code·​class="option">-​o</​code>·​編譯後的執行檔檔名,如果沒有使用這選項的話​,178 ······​下面只提一些必要且重要的選項,以作為例子。​</​p><div·​class="variablelist">​<dl·​class="variablelist">​<dt><span·​class="term"><code·​class="option">-​o·​<em·​class="replaceable"><​code>檔名</​code></​em></​code></​span></​dt><dd><p><code·​class="option">-​o</​code>·​編譯後的執行檔檔名,如果沒有使用這選項的話​,
179 »       ​····​編譯好的程式預設檔名將會是·​<code·​class="filename">a.​out</​code>179 »       ​····​編譯好的程式預設檔名將會是·​<code·​class="filename">a.​out</​code>
  
180 »       ​····​<a·​href="#ftn.​idp59642040"·​class="footnote"·​id="idp59642040"><sup​·​class="footnote">[4]<​/​sup></​a></​p><div·​class="informalexampl​e"><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​foobar.​c</​code></​strong>···············​<em·​class="lineannotation​"><span·​class="lineannotation​">執行檔就是·​a.​out</​span></​em>180 »       ​····​<a·​href="#ftn.​idp59687096"·​class="footnote"·​id="idp59687096"><sup​·​class="footnote">[4]<​/​sup></​a></​p><div·​class="informalexampl​e"><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​foobar.​c</​code></​strong>···············​<em·​class="lineannotation​"><span·​class="lineannotation​">執行檔就是·​a.​out</​span></​em>
181 <code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​-​o·​foobar·​foobar.​c</​code></​strong>·····​<em·​class="lineannotation​"><span·​class="lineannotation​">執行檔就是·​foobar</​span></​em>181 <code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​-​o·​foobar·​foobar.​c</​code></​strong>·····​<em·​class="lineannotation​"><span·​class="lineannotation​">執行檔就是·​foobar</​span></​em>
182 »       ​····​</​pre></​div></​dd><dt><span·​class="term"><code·​class="option">-​c</​code></​span></​dt><dd><p>使用·​<code·​class="option">-​c</​code>·​時,只會編譯原始碼,而不作連結(linki​ng)​。182 »       ​····​</​pre></​div></​dd><dt><span·​class="term"><code·​class="option">-​c</​code></​span></​dt><dd><p>使用·​<code·​class="option">-​c</​code>·​時,只會編譯原始碼,而不作連結(linki​ng)​。
183 »       ​····​當只想確認語法是否正確或使用·​Makefile·​來編譯程式時,這個選項非常有用。</​p><div·​class="informalexampl​e"><pre·​class="screen">183 »       ​····​當只想確認語法是否正確或使用·​Makefile·​來編譯程式時,這個選項非常有用。</​p><div·​class="informalexampl​e"><pre·​class="screen">
184 ········​<code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​-​c·​foobar.​c</​code></​strong>184 ········​<code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​-​c·​foobar.​c</​code></​strong>
185 »       ​····​</​pre></​div><p>這會產生叫做·​<code·​class="filename">foob​ar</​code>·​的·​<em·​class="firstterm">obj​ect·​file</​em>(非執行檔)​。185 »       ​····​</​pre></​div><p>這會產生叫做·​<code·​class="filename">foob​ar</​code>·​的·​<em·​class="firstterm">obj​ect·​file</​em>(非執行檔)​。
186 »       ​····​這檔可以與其他的·​object·​file·​連結在一起,而成執行檔。</​p></​dd><dt><span·​class="term"><code·​class="option">-​g</​code></​span></​dt><dd><p><code·​class="option">-​g</​code>·​將會把一些給·​gdb·​用的除錯訊息包進去執行檔裡面,所謂的除錯訊​息例如:186 »       ​····​這檔可以與其他的·​object·​file·​連結在一起,而成執行檔。</​p></​dd><dt><span·​class="term"><code·​class="option">-​g</​code></​span></​dt><dd><p><code·​class="option">-​g</​code>·​將會把一些給·​gdb·​用的除錯訊息包進去執行檔裡面,所謂的除錯訊​息例如:
187 »       ​····​程式在第幾行出錯、那個程式第幾行做什麼函式​呼叫等等。除錯資訊<span·​class="emphasis"><em>​非常</​em></​span>好用。187 »       ​····​程式在第幾行出錯、那個程式第幾行做什麼函式​呼叫等等。除錯資訊<span·​class="emphasis"><em>​非常</​em></​span>好用。
188 »       ​····​但缺點就是:對於程式來說,額外的除錯訊息會​讓編譯出來的程式比較肥些。188 »       ​····​但缺點就是:對於程式來說,額外的除錯訊息會​讓編譯出來的程式比較肥些。
189 »       ​····​<code·​class="option">-​g</​code>·​的適用時機在於:當程式還在開發時使用就好,​189 »       ​····​<code·​class="option">-​g</​code>·​的適用時機在於:當程式還在開發時使用就好,​
190 »       ​····​而當你要釋出你的·​<span·​class="quote">“<span·​class="quote">發行版本(re​lease·​version)​</​span>”</​span>190 »       ​····​而當你要釋出你的·​<span·​class="quote">“<span·​class="quote">發行版本(re​lease·​version)​</​span>”</​span>
191 »       ​····​或者確認程式可運作正常的話,就不必用·​<code·​class="option">-​g</​code>·​這選項了。</​p><div·​class="informalexampl​e"><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​-​g·​foobar.​c</​code></​strong>191 »       ​····​或者確認程式可運作正常的話,就不必用·​<code·​class="option">-​g</​code>·​這選項了。</​p><div·​class="informalexampl​e"><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​-​g·​foobar.​c</​code></​strong>
192 »       ​····​</​pre></​div><p>這動作會產生有含除錯訊息的執​行檔。192 »       ​····​</​pre></​div><p>這動作會產生有含除錯訊息的執​行檔。
193 »       ​····​<a·​href="#ftn.​idp59714488"·​class="footnote"·​id="idp59714488"><sup​·​class="footnote">[5]<​/​sup></​a></​p></​dd><dt><span·​class="term"><code·​class="option">-​O</​code></​span></​dt><dd><p><code·​class="option">-​O</​code>·​會產生最佳化的執行檔,193 »       ​····​<a·​href="#ftn.​idp59758136"·​class="footnote"·​id="idp59758136"><sup​·​class="footnote">[5]<​/​sup></​a></​p></​dd><dt><span·​class="term"><code·​class="option">-​O</​code></​span></​dt><dd><p><code·​class="option">-​O</​code>·​會產生最佳化的執行檔,
194 »       ​····​編譯器會使用一些技巧,來讓程式可以跑的比未​經最佳化的程式還快,194 »       ​····​編譯器會使用一些技巧,來讓程式可以跑的比未​經最佳化的程式還快,
195 »       ​····​可以在大寫·​O·​後面加上數字來指明想要的最佳化層級。195 »       ​····​可以在大寫·​O·​後面加上數字來指明想要的最佳化層級。
196 »       ​····​但是最佳化還是會有一些錯誤,舉例來說在·​FreeBSD·​2.​10·​release·​中用·​<code·​class="command">cc</​code>196 »       ​····​但是最佳化還是會有一些錯誤,舉例來說在·​FreeBSD·​2.​10·​release·​中用·​<code·​class="command">cc</​code>
197 »       ​····​且指定·​<code·​class="option">-​O2</​code>·​時,在某些情形下會產生錯誤的執行檔。</​p><p>只有當要釋出發行版本、或者加速程​式時,才需要使用最佳化選項。</​p><div·​class="informalexampl​e"><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​-​O·​-​o·​foobar·​foobar.​c</​code></​strong>197 »       ​····​且指定·​<code·​class="option">-​O2</​code>·​時,在某些情形下會產生錯誤的執行檔。</​p><p>只有當要釋出發行版本、或者加速程​式時,才需要使用最佳化選項。</​p><div·​class="informalexampl​e"><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​-​O·​-​o·​foobar·​foobar.​c</​code></​strong>
198 »       ​····​</​pre></​div><p>這會產生·​<code·​class="filename">foob​ar</​code>·​執行檔的最佳化版本。</​p></​dd></​dl></​div><p>以下三個參數將會強迫·​<code·​class="command">cc</​code>·​確認程式碼是否符合一些國際標準的規範,198 »       ​····​</​pre></​div><p>這會產生·​<code·​class="filename">foob​ar</​code>·​執行檔的最佳化版本。</​p></​dd></​dl></​div><p>以下三個參數將會強迫·​<code·​class="command">cc</​code>·​確認程式碼是否符合一些國際標準的規範,
199 ······​也就是通常說的·​<acronym·​class="acronym">ANSI<​/​acronym>·​標準,199 ······​也就是通常說的·​<acronym·​class="acronym">ANSI<​/​acronym>·​標準,
200 ······​而·​<acronym·​class="acronym">ANSI<​/​acronym>·​嚴格來講屬·​<acronym·​class="acronym">ISO</​acronym>·​標準。</​p><div·​class="variablelist">​<dl·​class="variablelist">​<dt><span·​class="term"><code·​class="option">-​Wall</​code></​span></​dt><dd><p><code·​class="option">-​Wall</​code>·​顯示·​<code·​class="command">cc</​code>··​維護者所認為值得注意的所有警告訊息。200 ······​而·​<acronym·​class="acronym">ANSI<​/​acronym>·​嚴格來講屬·​<acronym·​class="acronym">ISO</​acronym>·​標準。</​p><div·​class="variablelist">​<dl·​class="variablelist">​<dt><span·​class="term"><code·​class="option">-​Wall</​code></​span></​dt><dd><p><code·​class="option">-​Wall</​code>·​顯示·​<code·​class="command">cc</​code>··​維護者所認為值得注意的所有警告訊息。
Offset 221, 77 lines modifiedOffset 221, 77 lines modified
221 <code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>c++·​-​o·​foobar·​foobar.​cc</​code></​strong>221 <code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>c++·​-​o·​foobar·​foobar.​cc</​code></​strong>
222 »       ​····​</​pre></​div><p>上述指令都會從原始檔·​<code·​class="filename">foob​ar.​cc</​code>·​編譯產生名為·​<code·​class="filename">foob​oar</​code>·​的執行檔。222 »       ​····​</​pre></​div><p>上述指令都會從原始檔·​<code·​class="filename">foob​ar.​cc</​code>·​編譯產生名為·​<code·​class="filename">foob​oar</​code>·​的執行檔。
223 »       ​····​這邊要提醒的是在·​<span·​class="trademark">UNI​X</​span>®·​系統中·​C++·​程式傳統都以·​<code·​class="filename">.​C</​code>、223 »       ​····​這邊要提醒的是在·​<span·​class="trademark">UNI​X</​span>®·​系統中·​C++·​程式傳統都以·​<code·​class="filename">.​C</​code>、
224 »       ​····​<code·​class="filename">.​cxx</​code>·​或者是·​<code·​class="filename">.​cc</​code>·​作為副檔名,224 »       ​····​<code·​class="filename">.​cxx</​code>·​或者是·​<code·​class="filename">.​cc</​code>·​作為副檔名,
225 »       ​····​而非·​<span·​class="trademark">MS-​DOS</​span>®·​那種以·​<code·​class="filename">.​cpp</​code>·​作為副檔名的命名方式(不過也越來越普遍了)​。225 »       ​····​而非·​<span·​class="trademark">MS-​DOS</​span>®·​那種以·​<code·​class="filename">.​cpp</​code>·​作為副檔名的命名方式(不過也越來越普遍了)​。
226 »       ​····​<code·​class="command">gcc</​code>·​會依副檔名來決定用哪一種編譯器編譯,226 »       ​····​<code·​class="command">gcc</​code>·​會依副檔名來決定用哪一種編譯器編譯,
227 »       ​····​然而,現在已經不再限制副檔名了,227 »       ​····​然而,現在已經不再限制副檔名了,
228 »       ​····​所以可以自由的使用·​<code·​class="filename">.​cpp</​code>·​作為·​C++·​程式碼的副檔名!</​p></​dd></​dl></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59844408"></​a>2.​4.​1.​·​常見的·​<code·​class="command">cc</​code>·​問題</​h3></​div></​div></​div><div·​class="qandaset"><a·​id="idp59847096"></​a><dl><dt>2.​4.​1.​1.​·​<a·​href="#idp59847736">我​用·​sin()​·​函示撰寫我的程式,228 »       ​····​所以可以自由的使用·​<code·​class="filename">.​cpp</​code>·​作為·​C++·​程式碼的副檔名!</​p></​dd></​dl></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp59889464"></​a>2.​4.​1.​·​常見的·​<code·​class="command">cc</​code>·​問題</​h3></​div></​div></​div><div·​class="qandaset"><a·​id="idp59892152"></​a><dl><dt>2.​4.​1.​1.​·​<a·​href="#idp59892664">我​用·​sin()​·​函示撰寫我的程式,
229 »       ​······​但是有個錯誤訊息(如下)​,這代表著?</​a></​dt><dt>2.​4.​1.​2.​·​<a·​href="#idp59874360">好​吧,我試著寫些簡單的程式,來練習使用·​-​lm·​選項(該程式會運算·​2.​1·​的·​6·​次方)​</​a></​dt><dt>2.​4.​1.​3.​·​<a·​href="#idp59897784">那​如何才可以修正剛所說的問題?</​a></​dt><dt>2.​4.​1.​4.​·​<a·​href="#idp59914424">已​經編譯好·​foobar.​c,229 »       ​······​但是有個錯誤訊息(如下)​,這代表著?</​a></​dt><dt>2.​4.​1.​2.​·​<a·​href="#idp59904440">好​吧,我試著寫些簡單的程式,來練習使用·​-​lm·​選項(該程式會運算·​2.​1·​的·​6·​次方)​</​a></​dt><dt>2.​4.​1.​3.​·​<a·​href="#idp59939512">那​如何才可以修正剛所說的問題?</​a></​dt><dt>2.​4.​1.​4.​·​<a·​href="#idp59969080">已​經編譯好·​foobar.​c,
230 »       ​······​但是編譯後找不到·​foobar·​執行檔。·​該去哪邊找呢?</​a></​dt><dt>2.​4.​1.​5.​·​<a·​href="#idp59931832">好​,有個編譯好的程式叫做·​foobar,230 »       ​······​但是編譯後找不到·​foobar·​執行檔。·​該去哪邊找呢?</​a></​dt><dt>2.​4.​1.​5.​·​<a·​href="#idp59999544">好​,有個編譯好的程式叫做·​foobar,
231 »       ​······​用·​ls·​指令時可以看到,231 »       ​······​用·​ls·​指令時可以看到,
232 »       ​······​但執行時,訊息卻說卻沒有這檔案。為什麼?<​/​a></​dt><dt>2.​4.​1.​6.​·​<a·​href="#idp59948472">試​著執行·​test·​執行檔,232 »       ​······​但執行時,訊息卻說卻沒有這檔案。為什麼?<​/​a></​dt><dt>2.​4.​1.​6.​·​<a·​href="#idp60015544">試​著執行·​test·​執行檔,
233 »       ​······​但是卻沒有任何事發生,到底是哪裡出錯了?<​/​a></​dt><dt>2.​4.​1.​7.​·​<a·​href="#idp59983160">當​執行我寫的程式時剛開始正常,233 »       ​······​但是卻沒有任何事發生,到底是哪裡出錯了?<​/​a></​dt><dt>2.​4.​1.​7.​·​<a·​href="#idp60037304">當​執行我寫的程式時剛開始正常,
234 »       ​······​接下來卻出現·​core·​dumped·​錯誤訊息。這錯誤訊息到底代表什麼?</​a></​dt><dt>2.​4.​1.​8.​·​<a·​href="#idp59992760">真​是太神奇了!程式居然發生·​core·​dumped·​了,該怎麼辦?</​a></​dt><dt>2.​4.​1.​9.​·​<a·​href="#idp60004152">當​程式已經把·​core·​memory·​資料·​dump·​出來後,234 »       ​······​接下來卻出現·​core·​dumped·​錯誤訊息。這錯誤訊息到底代表什麼?</​a></​dt><dt>2.​4.​1.​8.​·​<a·​href="#idp60060088">真​是太神奇了!程式居然發生·​core·​dumped·​了,該怎麼辦?</​a></​dt><dt>2.​4.​1.​9.​·​<a·​href="#idp60071096">當​程式已經把·​core·​memory·​資料·​dump·​出來後,
235 »       ​······​同時也出現另一個錯誤·​segmentation·​fault·​這意思是?</​a></​dt><dt>2.​4.​1.​10.​·​<a·​href="#idp60051640">S​ometimes·​when·​I·​get·​a·​core·​dump·​it·​says235 »       ​······​同時也出現另一個錯誤·​segmentation·​fault·​這意思是?</​a></​dt><dt>2.​4.​1.​10.​·​<a·​href="#idp60119224">S​ometimes·​when·​I·​get·​a·​core·​dump·​it·​says
236 »       ​······​bus·​error.​··​It·​says·​in·​my·​UNIX®236 »       ​······​bus·​error.​··​It·​says·​in·​my·​UNIX®
237 »       ​······​book·​that·​this·​means·​a·​hardware·​problem,​·​but·​the237 »       ​······​book·​that·​this·​means·​a·​hardware·​problem,​·​but·​the
238 »       ​······​computer·​still·​seems·​to·​be·​working.​··​Is·​this238 »       ​······​computer·​still·​seems·​to·​be·​working.​··​Is·​this
239 »       ​······​true?</​a></​dt><dt>2.​4.​1.​11.​·​<a·​href="#idp60072248">T​his·​dumping·​core·​business·​sounds·​as·​though·​it·​could239 »       ​······​true?</​a></​dt><dt>2.​4.​1.​11.​·​<a·​href="#idp60127288">T​his·​dumping·​core·​business·​sounds·​as·​though·​it·​could
240 »       ​······​be·​quite·​useful,​·​if·​I·​can·​make·​it·​happen·​when·​I·​want·​to.​240 »       ​······​be·​quite·​useful,​·​if·​I·​can·​make·​it·​happen·​when·​I·​want·​to.​
241 »       ​······​Can·​I·​do·​this,​·​or·​do·​I·​have·​to·​wait·​until·​there·​is·​an241 »       ​······​Can·​I·​do·​this,​·​or·​do·​I·​have·​to·​wait·​until·​there·​is·​an
242 »       ​······​error?</​a></​dt></​dl><table·​border="0"·​style="width:​·​100%;​"><colgroup><col·​align="left"·​width="1%"·​/​><col·​/​></​colgroup><tbody><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59847736"></​a><a·​id="idp59848760"></​a><p><strong>2.​4.​1.​1.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>我用·​<code·​class="function">sin(​)​</​code>·​函示撰寫我的程式,242 »       ​······​error?</​a></​dt></​dl><table·​border="0"·​style="width:​·​100%;​"><colgroup><col·​align="left"·​width="1%"·​/​><col·​/​></​colgroup><tbody><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59892664"></​a><a·​id="idp59893176"></​a><p><strong>2.​4.​1.​1.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>我用·​<code·​class="function">sin(​)​</​code>·​函示撰寫我的程式,
243 »       ​······​但是有個錯誤訊息(如下)​,這代表著?</​p><div·​class="informalexampl​e"><pre·​class="screen">/​var/​tmp/​cc0143941.​o:​·​Undefined·​symbol·​`_sin'·​referenced·​from·​text·​segment243 »       ​······​但是有個錯誤訊息(如下)​,這代表著?</​p><div·​class="informalexampl​e"><pre·​class="screen">/​var/​tmp/​cc0143941.​o:​·​Undefined·​symbol·​`_sin'·​referenced·​from·​text·​segment
244 »       ​······​</​pre></​div></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>當使用·​<code·​class="function">sin(​)​</​code>·​這類的數學函示時,244 »       ​······​</​pre></​div></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>當使用·​<code·​class="function">sin(​)​</​code>·​這類的數學函示時,
245 »       ​······​你必須告訴·​cc·​要和數學函式庫作連結(linking)​,就像這樣:</​p><div·​class="informalexampl​e"><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​-​o·​foobar·​foobar.​c·​-​lm</​code></​strong>245 »       ​······​你必須告訴·​cc·​要和數學函式庫作連結(linking)​,就像這樣:</​p><div·​class="informalexampl​e"><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​-​o·​foobar·​foobar.​c·​-​lm</​code></​strong>
246 »       ​······​</​pre></​div></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59874360"></​a><a·​id="idp59875000"></​a><p><strong>2.​4.​1.​2.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>好吧,我試​著寫些簡單的程式,來練習使用·​-​lm·​選項(該程式會運算·​2.​1·​的·​6·​次方)​</​p><div·​class="informalexampl​e"><pre·​class="programlisting​">#include·​&lt;​stdio.​h&gt;​246 »       ​······​</​pre></​div></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59904440"></​a><a·​id="idp59905080"></​a><p><strong>2.​4.​1.​2.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>好吧,我試​著寫些簡單的程式,來練習使用·​-​lm·​選項(該程式會運算·​2.​1·​的·​6·​次方)​</​p><div·​class="informalexampl​e"><pre·​class="programlisting​">#include·​&lt;​stdio.​h&gt;​
  
247 int·​main()​·​{247 int·​main()​·​{
248 »       ​float·​f;​248 »       ​float·​f;​
  
249 »       ​f·​=·​pow(2.​1,​·​6)​;​249 »       ​f·​=·​pow(2.​1,​·​6)​;​
250 »       ​printf("2.​1·​^·​6·​=·​%f\n",​·​f)​;​250 »       ​printf("2.​1·​^·​6·​=·​%f\n",​·​f)​;​
251 »       ​return·​0;​251 »       ​return·​0;​
252 }252 }
253 »       ​······​</​pre></​div><p>然後進行編譯:</​p><div·​class="informalexampl​e"><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​temp.​c·​-​lm</​code></​strong>253 »       ​······​</​pre></​div><p>然後進行編譯:</​p><div·​class="informalexampl​e"><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​temp.​c·​-​lm</​code></​strong>
254 »       ​······​</​pre></​div><p>編譯後執行程式,得到下面這結​果:</​p><div·​class="informalexampl​e"><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>.​/​a.​out</​code></​strong>254 »       ​······​</​pre></​div><p>編譯後執行程式,得到下面這結​果:</​p><div·​class="informalexampl​e"><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>.​/​a.​out</​code></​strong>
255 2.​1·​^·​6·​=·​1023.​000000255 2.​1·​^·​6·​=·​1023.​000000
256 »       ​······​</​pre></​div><p>很明顯的,程式結果<span​·​class="emphasis"><em>​不是</​em></​span>正確答案,到底是哪邊出錯?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>當編譯器發​現你呼叫一個函示時,它會確認該函示的回傳值​類型(prototype)​,256 »       ​······​</​pre></​div><p>很明顯的,程式結果<span​·​class="emphasis"><em>​不是</​em></​span>正確答案,到底是哪邊出錯?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>當編譯器發​現你呼叫一個函示時,它會確認該函示的回傳值​類型(prototype)​,
257 »       ​······​如果沒有特別指明,則預設的回傳值類型為·​<span·​class="type">int(整數)​</​span>。257 »       ​······​如果沒有特別指明,則預設的回傳值類型為·​<span·​class="type">int(整數)​</​span>。
258 »       ​······​很明顯的,你的程式所需要的並不是回傳值類別​為·​<span·​class="type">int</​span>。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59897784"></​a><a·​id="idp59898296"></​a><p><strong>2.​4.​1.​3.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>那如何才可​以修正剛所說的問題?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>數學函示的​回傳值類型(prototype)​會定義在·​<code·​class="filename">math​.​h</​code>,258 »       ​······​很明顯的,你的程式所需要的並不是回傳值類別​為·​<span·​class="type">int</​span>。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59939512"></​a><a·​id="idp59940408"></​a><p><strong>2.​4.​1.​3.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>那如何才可​以修正剛所說的問題?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>數學函示的​回傳值類型(prototype)​會定義在·​<code·​class="filename">math​.​h</​code>,
259 »       ​······​如果你有·​include·​這檔,編譯器就會知道該函示的回傳值類型,如​此一來該運算就會得到正確的結果!</​p><div·​class="informalexampl​e"><pre·​class="programlisting​">#include·​&lt;​math.​h&gt;​259 »       ​······​如果你有·​include·​這檔,編譯器就會知道該函示的回傳值類型,如​此一來該運算就會得到正確的結果!</​p><div·​class="informalexampl​e"><pre·​class="programlisting​">#include·​&lt;​math.​h&gt;​
260 #include·​&lt;​stdio.​h&gt;​260 #include·​&lt;​stdio.​h&gt;​
  
261 int·​main()​·​{261 int·​main()​·​{
262 .​.​.​262 .​.​.​
263 »       ​······​</​pre></​div><p>加了上述內容之後,再重新編譯​,最後執行:</​p><div·​class="informalexampl​e"><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>.​/​a.​out</​code></​strong>263 »       ​······​</​pre></​div><p>加了上述內容之後,再重新編譯​,最後執行:</​p><div·​class="informalexampl​e"><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>.​/​a.​out</​code></​strong>
264 2.​1·​^·​6·​=·​85.​766121264 2.​1·​^·​6·​=·​85.​766121
265 »       ​······​</​pre></​div><p>如果有用到數學函式,<spa​n·​class="emphasis"><em>​請確定</​em></​span>要有·​include·​<code·​class="filename">math​.​h</​code>·​這檔,265 »       ​······​</​pre></​div><p>如果有用到數學函式,<spa​n·​class="emphasis"><em>​請確定</​em></​span>要有·​include·​<code·​class="filename">math​.​h</​code>·​這檔,
266 »       ​······​而且記得要和數學函式庫作連結。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59914424"></​a><a·​id="idp59915448"></​a><p><strong>2.​4.​1.​4.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>已經編譯好​·​<code·​class="filename">foob​ar.​c</​code>,266 »       ​······​而且記得要和數學函式庫作連結。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59969080"></​a><a·​id="idp59969976"></​a><p><strong>2.​4.​1.​4.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>已經編譯好​·​<code·​class="filename">foob​ar.​c</​code>,
267 »       ​······​但是編譯後找不到·​<code·​class="filename">foob​ar</​code>·​執行檔。·​該去哪邊找呢?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>記得,除非​有指定編譯結果的執行檔檔名,否則預設的執行​檔檔名是·​a.​out。267 »       ​······​但是編譯後找不到·​<code·​class="filename">foob​ar</​code>·​執行檔。·​該去哪邊找呢?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>記得,除非​有指定編譯結果的執行檔檔名,否則預設的執行​檔檔名是·​a.​out。
268 »       ​······​用·​<code·​class="option">-​o <em·​class="replaceable"><​code>filename</​code></​em></​code>·​參數,268 »       ​······​用·​<code·​class="option">-​o <em·​class="replaceable"><​code>filename</​code></​em></​code>·​參數,
269 »       ​······​就可以達到所想要的結果,比如:</​p><div·​class="informalexampl​e"><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​-​o·​foobar·​foobar.​c</​code></​strong>269 »       ​······​就可以達到所想要的結果,比如:</​p><div·​class="informalexampl​e"><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​-​o·​foobar·​foobar.​c</​code></​strong>
270 »       ​······​</​pre></​div></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59931832"></​a><a·​id="idp59932344"></​a><p><strong>2.​4.​1.​5.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>好,有個編​譯好的程式叫做·​<code·​class="filename">foob​ar</​code>,270 »       ​······​</​pre></​div></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59999544"></​a><a·​id="idp60000056"></​a><p><strong>2.​4.​1.​5.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>好,有個編​譯好的程式叫做·​<code·​class="filename">foob​ar</​code>,
271 »       ​······​用·​<code·​class="command">ls</​code>·​指令時可以看到,271 »       ​······​用·​<code·​class="command">ls</​code>·​指令時可以看到,
272 »       ​······​但執行時,訊息卻說卻沒有這檔案。為什麼?<​/​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>與·​<span·​class="trademark">MS-​DOS</​span>®·​不同的是,除非有指定執行檔的路徑,272 »       ​······​但執行時,訊息卻說卻沒有這檔案。為什麼?<​/​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>與·​<span·​class="trademark">MS-​DOS</​span>®·​不同的是,除非有指定執行檔的路徑,
273 »       ​······​否則·​<span·​class="trademark">UNI​X</​span>®·​系統並不會在目前的目錄下尋找你想執行的檔案​。273 »       ​······​否則·​<span·​class="trademark">UNI​X</​span>®·​系統並不會在目前的目錄下尋找你想執行的檔案​。
274 »       ​······​在指令列下打·​<code·​class="command">.​/​foobar</​code>·​代表274 »       ​······​在指令列下打·​<code·​class="command">.​/​foobar</​code>·​代表
275 »       ​······​<span·​class="quote">“<span·​class="quote">執行在這個目錄​底下名為·​<code·​class="filename">foob​ar</​code>·​的程式</​span>”</​span>,275 »       ​······​<span·​class="quote">“<span·​class="quote">執行在這個目錄​底下名為·​<code·​class="filename">foob​ar</​code>·​的程式</​span>”</​span>,
276 »       ​······​或者也可以更改·​<code·​class="envar">PATH</​code>·​環境變數設定如下,以達成類似效果:</​p><div·​class="informalexampl​e"><pre·​class="screen">bin:​/​usr/​bin:​/​usr/​local/​bin:​.​276 »       ​······​或者也可以更改·​<code·​class="envar">PATH</​code>·​環境變數設定如下,以達成類似效果:</​p><div·​class="informalexampl​e"><pre·​class="screen">bin:​/​usr/​bin:​/​usr/​local/​bin:​.​
277 »       ​······​</​pre></​div><p>上一行最後的·​".​"·​代表<span·​class="quote">“<span·​class="quote">如果在前面寫的​其他目錄找不到,就找目前的目錄</​span>”</​span>。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59948472"></​a><a·​id="idp59949112"></​a><p><strong>2.​4.​1.​6.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>試著執行·​<code·​class="filename">test​</​code>·​執行檔,277 »       ​······​</​pre></​div><p>上一行最後的·​".​"·​代表<span·​class="quote">“<span·​class="quote">如果在前面寫的​其他目錄找不到,就找目前的目錄</​span>”</​span>。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp60015544"></​a><a·​id="idp60015800"></​a><p><strong>2.​4.​1.​6.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>試著執行·​<code·​class="filename">test​</​code>·​執行檔,
278 »       ​······​但是卻沒有任何事發生,到底是哪裡出錯了?<​/​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>大多數的·​<span·​class="trademark">UNI​X</​span>®·​系統都會在路徑·​<code·​class="filename">/​usr/​bin</​code>·​擺放執行檔。278 »       ​······​但是卻沒有任何事發生,到底是哪裡出錯了?<​/​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>大多數的·​<span·​class="trademark">UNI​X</​span>®·​系統都會在路徑·​<code·​class="filename">/​usr/​bin</​code>·​擺放執行檔。
279 »       ​······​除非有指定使用在目前目錄內的·​<code·​class="filename">test​</​code>,否則·​shell·​會優先選擇位在279 »       ​······​除非有指定使用在目前目錄內的·​<code·​class="filename">test​</​code>,否則·​shell·​會優先選擇位在
280 »       ​······​<code·​class="filename">/​usr/​bin</​code>·​的·​<code·​class="filename">test​</​code>,280 »       ​······​<code·​class="filename">/​usr/​bin</​code>·​的·​<code·​class="filename">test​</​code>,
281 »       ​······​要指定檔名的話,作法類似:</​p><div·​class="informalexampl​e"><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>.​/​test</​code></​strong>281 »       ​······​要指定檔名的話,作法類似:</​p><div·​class="informalexampl​e"><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>.​/​test</​code></​strong>
282 »       ​······​</​pre></​div><p>為了避免上述困擾,請為你的程​式取更好的名稱吧!</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59983160"></​a><a·​id="idp59983800"></​a><p><strong>2.​4.​1.​7.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>當執行我寫​的程式時剛開始正常,282 »       ​······​</​pre></​div><p>為了避免上述困擾,請為你的程​式取更好的名稱吧!</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp60037304"></​a><a·​id="idp60051000"></​a><p><strong>2.​4.​1.​7.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>當執行我寫​的程式時剛開始正常,
283 »       ​······​接下來卻出現·​<span·​class="errorname">cor​e·​dumped</​span>·​錯誤訊息。這錯誤訊息到底代表什麼?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>關於·​<em·​class="firstterm">cor​e·​dumped</​em>·​這個名稱的由來,283 »       ​······​接下來卻出現·​<span·​class="errorname">cor​e·​dumped</​span>·​錯誤訊息。這錯誤訊息到底代表什麼?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>關於·​<em·​class="firstterm">cor​e·​dumped</​em>·​這個名稱的由來,
284 »       ​······​可以追溯到早期的·​<span·​class="trademark">UNI​X</​span>®·​系統開始使用·​core·​memory·​對資料排序時。284 »       ​······​可以追溯到早期的·​<span·​class="trademark">UNI​X</​span>®·​系統開始使用·​core·​memory·​對資料排序時。
285 »       ​······​基本上當程式在很多情況下發生錯誤後,285 »       ​······​基本上當程式在很多情況下發生錯誤後,
286 »       ​······​作業系統會把·​core·​memory·​中的資訊寫入·​<code·​class="filename">core​</​code>·​這檔案中,286 »       ​······​作業系統會把·​core·​memory·​中的資訊寫入·​<code·​class="filename">core​</​code>·​這檔案中,
287 »       ​······​以便讓·​programmer·​知道程式到底是為何出錯。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp59992760"></​a><a·​id="idp59993784"></​a><p><strong>2.​4.​1.​8.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>真是太神奇​了!程式居然發生·​<span·​class="errorname">cor​e·​dumped</​span>·​了,該怎麼辦?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>請用·​<code·​class="command">gdb</​code>·​來分析·​core·​結果(詳情請參考·​<a·​class="xref"·​href="#debugging"·​title="2.​6.​·​Debugging">節 2.​6,​·​“Debugging”</​a>)​。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp60004152"></​a><a·​id="idp60005048"></​a><p><strong>2.​4.​1.​9.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>當程式已經​把·​core·​memory·​資料·​dump·​出來後,287 »       ​······​以便讓·​programmer·​知道程式到底是為何出錯。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp60060088"></​a><a·​id="idp60060728"></​a><p><strong>2.​4.​1.​8.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>真是太神奇​了!程式居然發生·​<span·​class="errorname">cor​e·​dumped</​span>·​了,該怎麼辦?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>請用·​<code·​class="command">gdb</​code>·​來分析·​core·​結果(詳情請參考·​<a·​class="xref"·​href="#debugging"·​title="2.​6.​·​Debugging">節 2.​6,​·​“Debugging”</​a>)​。</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp60071096"></​a><a·​id="idp60072120"></​a><p><strong>2.​4.​1.​9.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>當程式已經​把·​core·​memory·​資料·​dump·​出來後,
288 »       ​······​同時也出現另一個錯誤·​<span·​class="errorname">seg​mentation·​fault</​span>·​這意思是?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>基本上,這​個錯誤表示你的程式在記憶體中試著做一個嚴重​的非法運作(illegal·​operation)​,288 »       ​······​同時也出現另一個錯誤·​<span·​class="errorname">seg​mentation·​fault</​span>·​這意思是?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>基本上,這​個錯誤表示你的程式在記憶體中試著做一個嚴重​的非法運作(illegal·​operation)​,
289 »       ​······​<span·​class="trademark">UNI​X</​span>®·​就是被設計來保護整個作業系統免於被惡質的程​式破壞,所以才會告訴你這個訊息。</​p><p>最常造成<span·​class="quote">“<span·​class="quote">segment​ation·​fault</​span>”</​span>的原因通常為:</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>試​著對一個·​<span·​class="symbol">NULL</​span>·​的指標(pointer)​作寫入的動作,如</​p><pre·​class="programlisting​">char·​*foo·​=·​NULL;​289 »       ​······​<span·​class="trademark">UNI​X</​span>®·​就是被設計來保護整個作業系統免於被惡質的程​式破壞,所以才會告訴你這個訊息。</​p><p>最常造成<span·​class="quote">“<span·​class="quote">segment​ation·​fault</​span>”</​span>的原因通常為:</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>試​著對一個·​<span·​class="symbol">NULL</​span>·​的指標(pointer)​作寫入的動作,如</​p><pre·​class="programlisting​">char·​*foo·​=·​NULL;​
290 strcpy(foo,​·​"bang!")​;​290 strcpy(foo,​·​"bang!")​;​
291 »       ​»       ​</​pre></​li><li·​class="listitem"><p>使​用一個尚未初始化(initialized)​的指標,如:</​p><pre·​class="programlisting​">char·​*foo;​291 »       ​»       ​</​pre></​li><li·​class="listitem"><p>使​用一個尚未初始化(initialized)​的指標,如:</​p><pre·​class="programlisting​">char·​*foo;​
292 strcpy(foo,​·​"bang!")​;​292 strcpy(foo,​·​"bang!")​;​
293 »       ​»       ​</​pre><p>尚未初始化的指標的初始值將會​是隨機的,如果你夠幸運的話,293 »       ​»       ​</​pre><p>尚未初始化的指標的初始值將會​是隨機的,如果你夠幸運的話,
294 »       ​»       ​··​這個指標的初始值會指向·​kernel·​已經用到的記憶體位置,294 »       ​»       ​··​這個指標的初始值會指向·​kernel·​已經用到的記憶體位置,
Offset 310, 22 lines modifiedOffset 310, 22 lines modified
310 »       ​»       ​</​pre><p>or</​p><pre·​class="programlisting​">char·​*foo·​=·​malloc(27)​;​310 »       ​»       ​</​pre><p>or</​p><pre·​class="programlisting​">char·​*foo·​=·​malloc(27)​;​
311 free(foo)​;​311 free(foo)​;​
312 free(foo)​;​312 free(foo)​;​
313 »       ​»       ​</​pre></​li></​ul></​div><p>Making·​one·​of·​these·​mistakes·​will·​not·​always·​lead·​to313 »       ​»       ​</​pre></​li></​ul></​div><p>Making·​one·​of·​these·​mistakes·​will·​not·​always·​lead·​to
314 »       ​······​an·​error,​·​but·​they·​are·​always·​bad·​practice.​··​Some314 »       ​······​an·​error,​·​but·​they·​are·​always·​bad·​practice.​··​Some
315 »       ​······​systems·​and·​compilers·​are·​more·​tolerant·​than·​others,​315 »       ​······​systems·​and·​compilers·​are·​more·​tolerant·​than·​others,​
316 »       ​······​which·​is·​why·​programs·​that·​ran·​well·​on·​one·​system·​can316 »       ​······​which·​is·​why·​programs·​that·​ran·​well·​on·​one·​system·​can
317 »       ​······​crash·​when·​you·​try·​them·​on·​an·​another.​</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp60051640"></​a><a·​id="idp60053048"></​a><p><strong>2.​4.​1.​10.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>Somet​imes·​when·​I·​get·​a·​core·​dump·​it·​says317 »       ​······​crash·​when·​you·​try·​them·​on·​an·​another.​</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp60119224"></​a><a·​id="idp60119480"></​a><p><strong>2.​4.​1.​10.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>Somet​imes·​when·​I·​get·​a·​core·​dump·​it·​says
318 »       ​······​<span·​class="errorname">bus​·​error</​span>.​··​It·​says·​in·​my·​<span·​class="trademark">UNI​X</​span>®318 »       ​······​<span·​class="errorname">bus​·​error</​span>.​··​It·​says·​in·​my·​<span·​class="trademark">UNI​X</​span>®
319 »       ​······​book·​that·​this·​means·​a·​hardware·​problem,​·​but·​the319 »       ​······​book·​that·​this·​means·​a·​hardware·​problem,​·​but·​the
320 »       ​······​computer·​still·​seems·​to·​be·​working.​··​Is·​this320 »       ​······​computer·​still·​seems·​to·​be·​working.​··​Is·​this
321 »       ​······​true?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>No,​·​fortunately·​not·​(unless·​of·​course·​you·​really·​do321 »       ​······​true?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>No,​·​fortunately·​not·​(unless·​of·​course·​you·​really·​do
322 »       ​······​have·​a·​hardware·​problem…)​.​··​This·​is·​usually322 »       ​······​have·​a·​hardware·​problem…)​.​··​This·​is·​usually
323 »       ​······​another·​way·​of·​saying·​that·​you·​accessed·​memory·​in·​a·​way323 »       ​······​another·​way·​of·​saying·​that·​you·​accessed·​memory·​in·​a·​way
324 »       ​······​you·​should·​not·​have.​</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp60072248"></​a><a·​id="idp60072760"></​a><p><strong>2.​4.​1.​11.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>This·​dumping·​core·​business·​sounds·​as·​though·​it·​could324 »       ​······​you·​should·​not·​have.​</​p></​td></​tr><tr·​class="question"><td·​align="left"·​valign="top"><a·​id="idp60127288"></​a><a·​id="idp60128184"></​a><p><strong>2.​4.​1.​11.​</​strong></​p></​td><td·​align="left"·​valign="top"><p>This·​dumping·​core·​business·​sounds·​as·​though·​it·​could
325 »       ​······​be·​quite·​useful,​·​if·​I·​can·​make·​it·​happen·​when·​I·​want·​to.​325 »       ​······​be·​quite·​useful,​·​if·​I·​can·​make·​it·​happen·​when·​I·​want·​to.​
326 »       ​······​Can·​I·​do·​this,​·​or·​do·​I·​have·​to·​wait·​until·​there·​is·​an326 »       ​······​Can·​I·​do·​this,​·​or·​do·​I·​have·​to·​wait·​until·​there·​is·​an
327 »       ​······​error?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>Yes,​·​just·​go·​to·​another·​console·​or·​xterm,​·​do</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>ps</​code></​strong>327 »       ​······​error?</​p></​td></​tr><tr·​class="answer"><td·​align="left"·​valign="top"></​td><td·​align="left"·​valign="top"><p>Yes,​·​just·​go·​to·​another·​console·​or·​xterm,​·​do</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>ps</​code></​strong>
328 »       ​····​</​pre><p>to·​find·​out·​the·​process·​ID·​of·​your·​program,​·​and328 »       ​····​</​pre><p>to·​find·​out·​the·​process·​ID·​of·​your·​program,​·​and
329 »       ​······​do</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>kill·​-​ABRT·​pid</​code></​strong>329 »       ​······​do</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>kill·​-​ABRT·​pid</​code></​strong>
330 »       ​····​</​pre><p>where330 »       ​····​</​pre><p>where
331 »       ​······​<em·​class="parameter"><co​de><em·​class="replaceable"><​code>pid</​code></​em></​code></​em>·​is331 »       ​······​<em·​class="parameter"><co​de><em·​class="replaceable"><​code>pid</​code></​em></​code></​em>·​is
Offset 334, 15 lines modifiedOffset 334, 15 lines modified
334 »       ​······​trap·​<span·​class="symbol">SIGABR​T</​span>,​·​there·​are·​several·​other334 »       ​······​trap·​<span·​class="symbol">SIGABR​T</​span>,​·​there·​are·​several·​other
335 »       ​······​signals·​which·​have·​a·​similar·​effect.​</​p><p>Alternatively,​·​you·​can·​create·​a·​core·​dump·​from335 »       ​······​signals·​which·​have·​a·​similar·​effect.​</​p><p>Alternatively,​·​you·​can·​create·​a·​core·​dump·​from
336 »       ​······​inside·​your·​program,​·​by·​calling·​the336 »       ​······​inside·​your·​program,​·​by·​calling·​the
337 »       ​······​<code·​class="function">abor​t()​</​code>·​function.​·​See·​the·​manual·​page337 »       ​······​<code·​class="function">abor​t()​</​code>·​function.​·​See·​the·​manual·​page
338 »       ​······​of·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=abort&amp;​sektion=3&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>abort</​span>(3)​</​span></​a>·​to·​learn·​more.​</​p><p>If·​you·​want·​to·​create·​a·​core·​dump·​from·​outside·​your338 »       ​······​of·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=abort&amp;​sektion=3&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>abort</​span>(3)​</​span></​a>·​to·​learn·​more.​</​p><p>If·​you·​want·​to·​create·​a·​core·​dump·​from·​outside·​your
339 ··············​program,​·​but·​do·​not·​want·​the·​process·​to·​terminate,​·​you339 ··············​program,​·​but·​do·​not·​want·​the·​process·​to·​terminate,​·​you
340 ··············​can·​use·​the·​<code·​class="command">gcore​</​code>·​program.​·​See·​the340 ··············​can·​use·​the·​<code·​class="command">gcore​</​code>·​program.​·​See·​the
341 ··············​manual·​page·​of·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=gcore&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>gcore</​span>(1)​</​span></​a>·​for·​more·​information.​</​p></​td></​tr></​tbody></​table></​div></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="tools-​make"></​a>2.​5.​·​Make</​h2></​div></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60117944"></​a>2.​5.​1.​·​What·​is·​<code·​class="command">make<​/​code>?</​h3></​div></​div></​div><p>When·​you·​are·​working·​on·​a·​simple·​program·​with·​only·​one·​or341 ··············​manual·​page·​of·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=gcore&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>gcore</​span>(1)​</​span></​a>·​for·​more·​information.​</​p></​td></​tr></​tbody></​table></​div></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="tools-​make"></​a>2.​5.​·​Make</​h2></​div></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60177592"></​a>2.​5.​1.​·​What·​is·​<code·​class="command">make<​/​code>?</​h3></​div></​div></​div><p>When·​you·​are·​working·​on·​a·​simple·​program·​with·​only·​one·​or
342 »       ​two·​source·​files,​·​typing·​in</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​file1.​c·​file2.​c</​code></​strong></​pre><p>is·​not·​too·​bad,​·​but·​it·​quickly·​becomes·​very·​tedious·​when342 »       ​two·​source·​files,​·​typing·​in</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​file1.​c·​file2.​c</​code></​strong></​pre><p>is·​not·​too·​bad,​·​but·​it·​quickly·​becomes·​very·​tedious·​when
343 »       ​there·​are·​several·​files——and·​it·​can·​take·​a·​while·​to343 »       ​there·​are·​several·​files——and·​it·​can·​take·​a·​while·​to
344 »       ​compile,​·​too.​</​p><p>One·​way·​to·​get·​around·​this·​is·​to·​use·​object·​files·​and·​only344 »       ​compile,​·​too.​</​p><p>One·​way·​to·​get·​around·​this·​is·​to·​use·​object·​files·​and·​only
345 »       ​recompile·​the·​source·​file·​if·​the·​source·​code·​has·​changed.​··​So345 »       ​recompile·​the·​source·​file·​if·​the·​source·​code·​has·​changed.​··​So
346 »       ​we·​could·​have·​something·​like:​</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​file1.​o·​file2.​o</​code></​strong>·​…·​<strong·​class="userinput"><co​de>file37.​c</​code></​strong>·​…</​pre><p>if·​we·​had·​changed·​<code·​class="filename">file​37.​c</​code>,​·​but·​not·​any346 »       ​we·​could·​have·​something·​like:​</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>cc·​file1.​o·​file2.​o</​code></​strong>·​…·​<strong·​class="userinput"><co​de>file37.​c</​code></​strong>·​…</​pre><p>if·​we·​had·​changed·​<code·​class="filename">file​37.​c</​code>,​·​but·​not·​any
347 »       ​of·​the·​others,​·​since·​the·​last·​time·​we·​compiled.​··​This·​may347 »       ​of·​the·​others,​·​since·​the·​last·​time·​we·​compiled.​··​This·​may
348 »       ​speed·​up·​the·​compilation·​quite·​a·​bit,​·​but·​does·​not·​solve·​the348 »       ​speed·​up·​the·​compilation·​quite·​a·​bit,​·​but·​does·​not·​solve·​the
Offset 369, 15 lines modifiedOffset 369, 15 lines modified
369 »       ​source·​they·​apply·​to,​·​and·​can·​be·​called369 »       ​source·​they·​apply·​to,​·​and·​can·​be·​called
370 »       ​<code·​class="filename">make​file</​code>,​·​<code·​class="filename">Make​file</​code>370 »       ​<code·​class="filename">make​file</​code>,​·​<code·​class="filename">Make​file</​code>
371 »       ​or·​<code·​class="filename">MAKE​FILE</​code>.​··​Most·​programmers·​use·​the371 »       ​or·​<code·​class="filename">MAKE​FILE</​code>.​··​Most·​programmers·​use·​the
372 »       ​name·​<code·​class="filename">Make​file</​code>,​·​as·​this·​puts·​it·​near·​the372 »       ​name·​<code·​class="filename">Make​file</​code>,​·​as·​this·​puts·​it·​near·​the
373 »       ​top·​of·​a·​directory·​listing,​·​where·​it·​can·​easily·​be373 »       ​top·​of·​a·​directory·​listing,​·​where·​it·​can·​easily·​be
374 »       ​seen.​374 »       ​seen.​
  
375 »       ​<a·​href="#ftn.​idp60160696"·​class="footnote"·​id="idp60160696"><sup​·​class="footnote">[6]<​/​sup></​a></​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60170680"></​a>2.​5.​2.​·​Example·​of·​using·​<code·​class="command">make<​/​code></​h3></​div></​div></​div><p>Here·​is·​a·​very·​simple·​make·​file:​</​p><pre·​class="programlisting​">foo:​·​foo.​c375 »       ​<a·​href="#ftn.​idp60223672"·​class="footnote"·​id="idp60223672"><sup​·​class="footnote">[6]<​/​sup></​a></​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60228536"></​a>2.​5.​2.​·​Example·​of·​using·​<code·​class="command">make<​/​code></​h3></​div></​div></​div><p>Here·​is·​a·​very·​simple·​make·​file:​</​p><pre·​class="programlisting​">foo:​·​foo.​c
376 »       ​cc·​-​o·​foo·​foo.​c</​pre><p>It·​consists·​of·​two·​lines,​·​a·​dependency·​line·​and·​a·​creation376 »       ​cc·​-​o·​foo·​foo.​c</​pre><p>It·​consists·​of·​two·​lines,​·​a·​dependency·​line·​and·​a·​creation
377 »       ​line.​</​p><p>The·​dependency·​line·​here·​consists·​of·​the·​name·​of·​the377 »       ​line.​</​p><p>The·​dependency·​line·​here·​consists·​of·​the·​name·​of·​the
378 »       ​program·​(known·​as·​the·​<em·​class="firstterm">tar​get</​em>)​,​·​followed378 »       ​program·​(known·​as·​the·​<em·​class="firstterm">tar​get</​em>)​,​·​followed
379 »       ​by·​a·​colon,​·​then·​whitespace,​·​then·​the·​name·​of·​the·​source·​file.​379 »       ​by·​a·​colon,​·​then·​whitespace,​·​then·​the·​name·​of·​the·​source·​file.​
380 »       ​When·​<code·​class="command">make<​/​code>·​reads·​this·​line,​·​it·​looks·​to·​see380 »       ​When·​<code·​class="command">make<​/​code>·​reads·​this·​line,​·​it·​looks·​to·​see
381 »       ​if·​<code·​class="filename">foo<​/​code>·​exists;​·​if·​it·​exists,​·​it·​compares381 »       ​if·​<code·​class="filename">foo<​/​code>·​exists;​·​if·​it·​exists,​·​it·​compares
382 »       ​the·​time·​<code·​class="filename">foo<​/​code>·​was·​last·​modified·​to·​the382 »       ​the·​time·​<code·​class="filename">foo<​/​code>·​was·​last·​modified·​to·​the
Offset 427, 15 lines modifiedOffset 427, 15 lines modified
427 »       ​If·​you·​do·​not·​quite·​understand·​how·​<code·​class="command">make<​/​code>427 »       ​If·​you·​do·​not·​quite·​understand·​how·​<code·​class="command">make<​/​code>
428 »       ​works,​·​the·​best·​thing·​to·​do·​is·​to·​write·​a·​simple·​program·​like428 »       ​works,​·​the·​best·​thing·​to·​do·​is·​to·​write·​a·​simple·​program·​like
429 »       ​<span·​class="quote">“<span·​class="quote">hello·​world</​span>”</​span>·​and·​a·​make·​file·​like·​the·​one·​above429 »       ​<span·​class="quote">“<span·​class="quote">hello·​world</​span>”</​span>·​and·​a·​make·​file·​like·​the·​one·​above
430 »       ​and·​experiment.​··​Then·​progress·​to·​using·​more·​than·​one·​source430 »       ​and·​experiment.​··​Then·​progress·​to·​using·​more·​than·​one·​source
431 »       ​file,​·​or·​having·​the·​source·​file·​include·​a·​header·​file.​··​The431 »       ​file,​·​or·​having·​the·​source·​file·​include·​a·​header·​file.​··​The
432 »       ​<code·​class="command">touch​</​code>·​command·​is·​very·​useful·​here——it432 »       ​<code·​class="command">touch​</​code>·​command·​is·​very·​useful·​here——it
433 »       ​changes·​the·​date·​on·​a·​file·​without·​you·​having·​to·​edit433 »       ​changes·​the·​date·​on·​a·​file·​without·​you·​having·​to·​edit
434 »       ​it.​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60244792"></​a>2.​5.​3.​·​Make·​and·​include-​files</​h3></​div></​div></​div><p>C·​code·​often·​starts·​with·​a·​list·​of·​files·​to·​include,​·​for434 »       ​it.​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60295352"></​a>2.​5.​3.​·​Make·​and·​include-​files</​h3></​div></​div></​div><p>C·​code·​often·​starts·​with·​a·​list·​of·​files·​to·​include,​·​for
435 »       ​example·​stdio.​h.​·​Some·​of·​these·​files·​are·​system-​include435 »       ​example·​stdio.​h.​·​Some·​of·​these·​files·​are·​system-​include
436 »       ​files,​·​some·​of·​them·​are·​from·​the·​project·​you·​are·​now·​working436 »       ​files,​·​some·​of·​them·​are·​from·​the·​project·​you·​are·​now·​working
437 »       ​on:​437 »       ​on:​
438 ······​</​p><pre·​class="programlisting​">#include·​&lt;​stdio.​h&gt;​438 ······​</​p><pre·​class="programlisting​">#include·​&lt;​stdio.​h&gt;​
439 #include·​"foo.​h"439 #include·​"foo.​h"
  
440 int·​main(.​.​.​.​</​pre><p>To·​make·​sure·​that·​this·​file·​is·​recompiled·​the·​moment440 int·​main(.​.​.​.​</​pre><p>To·​make·​sure·​that·​this·​file·​is·​recompiled·​the·​moment
Offset 450, 15 lines modifiedOffset 450, 15 lines modified
450 »       ​of·​include-​files·​and·​their·​dependencies:​·​<code·​class="option">-​MM</​code>.​450 »       ​of·​include-​files·​and·​their·​dependencies:​·​<code·​class="option">-​MM</​code>.​
451 ······​</​p><p>If·​you·​add·​this·​to·​your·​Makefile:​</​p><pre·​class="programlisting​">depend:​451 ······​</​p><p>If·​you·​add·​this·​to·​your·​Makefile:​</​p><pre·​class="programlisting​">depend:​
452 »       ​gcc·​-​E·​-​MM·​*.​c·​&gt;​·​.​depend</​pre><p>and·​run·​<strong·​class="userinput"><co​de>make·​depend</​code></​strong>,​·​the·​file452 »       ​gcc·​-​E·​-​MM·​*.​c·​&gt;​·​.​depend</​pre><p>and·​run·​<strong·​class="userinput"><co​de>make·​depend</​code></​strong>,​·​the·​file
453 »       ​<code·​class="filename">.​depend</​code>·​will·​appear·​with·​a·​list·​of453 »       ​<code·​class="filename">.​depend</​code>·​will·​appear·​with·​a·​list·​of
454 »       ​object-​files,​·​C-​files·​and·​the·​include-​files:​</​p><pre·​class="programlisting​">foo.​o:​·​foo.​c·​foo.​h</​pre><p>If·​you·​change·​<code·​class="filename">foo.​h</​code>,​·​next·​time454 »       ​object-​files,​·​C-​files·​and·​the·​include-​files:​</​p><pre·​class="programlisting​">foo.​o:​·​foo.​c·​foo.​h</​pre><p>If·​you·​change·​<code·​class="filename">foo.​h</​code>,​·​next·​time
455 »       ​you·​run·​<code·​class="command">make<​/​code>·​all·​files·​depending·​on455 »       ​you·​run·​<code·​class="command">make<​/​code>·​all·​files·​depending·​on
456 »       ​<code·​class="filename">foo.​h</​code>·​will·​be·​recompiled.​</​p><p>Do·​not·​forget·​to·​run·​<code·​class="command">make·​depend</​code>·​each456 »       ​<code·​class="filename">foo.​h</​code>·​will·​be·​recompiled.​</​p><p>Do·​not·​forget·​to·​run·​<code·​class="command">make·​depend</​code>·​each
457 ········​time·​you·​add·​an·​include-​file·​to·​one·​of·​your·​files.​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60269624"></​a>2.​5.​4.​·​FreeBSD·​Makefiles</​h3></​div></​div></​div><p>Makefiles·​can·​be·​rather·​complicated·​to·​write.​··​Fortunately,​457 ········​time·​you·​add·​an·​include-​file·​to·​one·​of·​your·​files.​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60321336"></​a>2.​5.​4.​·​FreeBSD·​Makefiles</​h3></​div></​div></​div><p>Makefiles·​can·​be·​rather·​complicated·​to·​write.​··​Fortunately,​
458 »       ​BSD-​based·​systems·​like·​FreeBSD·​come·​with·​some·​very·​powerful458 »       ​BSD-​based·​systems·​like·​FreeBSD·​come·​with·​some·​very·​powerful
459 »       ​ones·​as·​part·​of·​the·​system.​··​One·​very·​good·​example·​of·​this·​is459 »       ​ones·​as·​part·​of·​the·​system.​··​One·​very·​good·​example·​of·​this·​is
460 »       ​the·​FreeBSD·​ports·​system.​··​Here·​is·​the·​essential·​part·​of·​a460 »       ​the·​FreeBSD·​ports·​system.​··​Here·​is·​the·​essential·​part·​of·​a
461 »       ​typical·​ports·​<code·​class="filename">Make​file</​code>:​</​p><pre·​class="programlisting​">MASTER_SITES=···​ftp:​/​/​freefall.​cdrom.​com/​pub/​FreeBSD/​LOCAL_PORTS/​461 »       ​typical·​ports·​<code·​class="filename">Make​file</​code>:​</​p><pre·​class="programlisting​">MASTER_SITES=···​ftp:​/​/​freefall.​cdrom.​com/​pub/​FreeBSD/​LOCAL_PORTS/​
462 DISTFILES=······​scheme-​microcode+dist-​7.​3-​freebsd.​tgz462 DISTFILES=······​scheme-​microcode+dist-​7.​3-​freebsd.​tgz
  
463 .​include·​&lt;​bsd.​port.​mk&gt;​</​pre><p>Now,​·​if·​we·​go·​to·​the·​directory·​for·​this·​port·​and·​type463 .​include·​&lt;​bsd.​port.​mk&gt;​</​pre><p>Now,​·​if·​we·​go·​to·​the·​directory·​for·​this·​port·​and·​type
Offset 496, 15 lines modifiedOffset 496, 15 lines modified
496 »       ​couple·​of·​other·​things·​I·​did·​not·​mention,​·​including·​handling496 »       ​couple·​of·​other·​things·​I·​did·​not·​mention,​·​including·​handling
497 »       ​any·​errors·​that·​may·​occur)​·​and·​anyone·​can·​get·​access·​to·​that497 »       ​any·​errors·​that·​may·​occur)​·​and·​anyone·​can·​get·​access·​to·​that
498 »       ​just·​by·​putting·​a·​single·​line·​in·​their·​own·​make·​file!</​p><p>If·​you·​want·​to·​have·​a·​look·​at·​these·​system·​makefiles,​498 »       ​just·​by·​putting·​a·​single·​line·​in·​their·​own·​make·​file!</​p><p>If·​you·​want·​to·​have·​a·​look·​at·​these·​system·​makefiles,​
499 »       ​they·​are·​in·​<code·​class="filename">/​usr/​share/​mk</​code>,​·​but·​it·​is499 »       ​they·​are·​in·​<code·​class="filename">/​usr/​share/​mk</​code>,​·​but·​it·​is
500 »       ​probably·​best·​to·​wait·​until·​you·​have·​had·​a·​bit·​of·​practice·​with500 »       ​probably·​best·​to·​wait·​until·​you·​have·​had·​a·​bit·​of·​practice·​with
501 »       ​makefiles,​·​as·​they·​are·​very·​complicated·​(and·​if·​you·​do·​look·​at501 »       ​makefiles,​·​as·​they·​are·​very·​complicated·​(and·​if·​you·​do·​look·​at
502 »       ​them,​·​make·​sure·​you·​have·​a·​flask·​of·​strong·​coffee502 »       ​them,​·​make·​sure·​you·​have·​a·​flask·​of·​strong·​coffee
503 »       ​handy!)​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60336952"></​a>2.​5.​5.​·​More·​advanced·​uses·​of·​<code·​class="command">make<​/​code></​h3></​div></​div></​div><p><code·​class="command">Make<​/​code>·​is·​a·​very·​powerful·​tool,​·​and·​can503 »       ​handy!)​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60391992"></​a>2.​5.​5.​·​More·​advanced·​uses·​of·​<code·​class="command">make<​/​code></​h3></​div></​div></​div><p><code·​class="command">Make<​/​code>·​is·​a·​very·​powerful·​tool,​·​and·​can
504 »       ​do·​much·​more·​than·​the·​simple·​example·​above·​shows.​504 »       ​do·​much·​more·​than·​the·​simple·​example·​above·​shows.​
505 »       ​Unfortunately,​·​there·​are·​several·​different·​versions·​of505 »       ​Unfortunately,​·​there·​are·​several·​different·​versions·​of
506 »       ​<code·​class="command">make<​/​code>,​·​and·​they·​all·​differ·​considerably.​506 »       ​<code·​class="command">make<​/​code>,​·​and·​they·​all·​differ·​considerably.​
507 »       ​The·​best·​way·​to·​learn·​what·​they·​can·​do·​is·​probably·​to·​read·​the507 »       ​The·​best·​way·​to·​learn·​what·​they·​can·​do·​is·​probably·​to·​read·​the
508 »       ​documentation——hopefu​lly·​this·​introduction·​will·​have508 »       ​documentation——hopefu​lly·​this·​introduction·​will·​have
509 »       ​given·​you·​a·​base·​from·​which·​you·​can·​do·​this.​</​p><p>The·​version·​of·​make·​that·​comes·​with·​FreeBSD·​is·​the509 »       ​given·​you·​a·​base·​from·​which·​you·​can·​do·​this.​</​p><p>The·​version·​of·​make·​that·​comes·​with·​FreeBSD·​is·​the
510 »       ​<span·​class="application">B​erkeley·​make</​span>;​·​there·​is·​a·​tutorial510 »       ​<span·​class="application">B​erkeley·​make</​span>;​·​there·​is·​a·​tutorial
Offset 518, 15 lines modifiedOffset 518, 15 lines modified
518 »       ​make</​span>,​·​you·​will·​have·​to·​edit·​the518 »       ​make</​span>,​·​you·​will·​have·​to·​edit·​the
519 »       ​<code·​class="filename">dir<​/​code>·​file·​in·​the519 »       ​<code·​class="filename">dir<​/​code>·​file·​in·​the
520 »       ​<code·​class="filename">/​usr/​local/​info</​code>·​directory·​to·​add·​an·​entry520 »       ​<code·​class="filename">/​usr/​local/​info</​code>·​directory·​to·​add·​an·​entry
521 »       ​for·​it.​··​This·​involves·​adding·​a·​line·​like</​p><pre·​class="programlisting​">·​*·​Make:​·​(make)​.​·················​The·​GNU·​Make·​utility.​</​pre><p>to·​the·​file.​··​Once·​you·​have·​done·​this,​·​you·​can·​type521 »       ​for·​it.​··​This·​involves·​adding·​a·​line·​like</​p><pre·​class="programlisting​">·​*·​Make:​·​(make)​.​·················​The·​GNU·​Make·​utility.​</​pre><p>to·​the·​file.​··​Once·​you·​have·​done·​this,​·​you·​can·​type
522 »       ​<strong·​class="userinput"><co​de>info</​code></​strong>·​and·​then·​select522 »       ​<strong·​class="userinput"><co​de>info</​code></​strong>·​and·​then·​select
523 »       ​<span·​class="guimenuitem">m​ake</​span>·​from·​the·​menu·​(or·​in523 »       ​<span·​class="guimenuitem">m​ake</​span>·​from·​the·​menu·​(or·​in
524 »       ​<span·​class="application">E​macs</​span>,​·​do·​<strong·​class="userinput"><co​de>C-​h524 »       ​<span·​class="application">E​macs</​span>,​·​do·​<strong·​class="userinput"><co​de>C-​h
525 »       ​··​i</​code></​strong>)​.​</​p></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="debugging"></​a>2.​6.​·​Debugging</​h2></​div></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60365240"></​a>2.​6.​1.​·​The·​Debugger</​h3></​div></​div></​div><p>The·​debugger·​that·​comes·​with·​FreeBSD·​is·​called525 »       ​··​i</​code></​strong>)​.​</​p></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="debugging"></​a>2.​6.​·​Debugging</​h2></​div></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60477112"></​a>2.​6.​1.​·​The·​Debugger</​h3></​div></​div></​div><p>The·​debugger·​that·​comes·​with·​FreeBSD·​is·​called
526 »       ​<code·​class="command">gdb</​code>·​(<span·​class="application">G​NU526 »       ​<code·​class="command">gdb</​code>·​(<span·​class="application">G​NU
527 »       ​··​debugger</​span>)​.​··​You·​start·​it·​up·​by·​typing</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>gdb·​progname</​code></​strong></​pre><p>although·​most·​people·​prefer·​to·​run·​it·​inside527 »       ​··​debugger</​span>)​.​··​You·​start·​it·​up·​by·​typing</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>gdb·​progname</​code></​strong></​pre><p>although·​most·​people·​prefer·​to·​run·​it·​inside
528 »       ​<span·​class="application">E​macs</​span>.​··​You·​can·​do·​this·​by:​</​p><pre·​class="screen"><stron​g·​class="userinput"><co​de>M-​x·​gdb·​RET·​progname·​RET</​code></​strong></​pre><p>Using·​a·​debugger·​allows·​you·​to·​run·​the·​program·​under·​more528 »       ​<span·​class="application">E​macs</​span>.​··​You·​can·​do·​this·​by:​</​p><pre·​class="screen"><stron​g·​class="userinput"><co​de>M-​x·​gdb·​RET·​progname·​RET</​code></​strong></​pre><p>Using·​a·​debugger·​allows·​you·​to·​run·​the·​program·​under·​more
529 »       ​controlled·​circumstances.​··​Typically,​·​you·​can·​step·​through·​the529 »       ​controlled·​circumstances.​··​Typically,​·​you·​can·​step·​through·​the
530 »       ​program·​a·​line·​at·​a·​time,​·​inspect·​the·​value·​of·​variables,​530 »       ​program·​a·​line·​at·​a·​time,​·​inspect·​the·​value·​of·​variables,​
531 »       ​change·​them,​·​tell·​the·​debugger·​to·​run·​up·​to·​a·​certain·​point531 »       ​change·​them,​·​tell·​the·​debugger·​to·​run·​up·​to·​a·​certain·​point
532 »       ​and·​then·​stop,​·​and·​so·​on.​··​You·​can·​even·​attach·​to·​a·​program532 »       ​and·​then·​stop,​·​and·​so·​on.​··​You·​can·​even·​attach·​to·​a·​program
Offset 535, 15 lines modifiedOffset 535, 15 lines modified
535 »       ​though·​that·​is·​a·​little·​trickier·​than·​the·​user·​applications535 »       ​though·​that·​is·​a·​little·​trickier·​than·​the·​user·​applications
536 »       ​we·​will·​be·​discussing·​in·​this·​section.​</​p><p><code·​class="command">gdb</​code>·​has·​quite·​good·​on-​line·​help,​·​as536 »       ​we·​will·​be·​discussing·​in·​this·​section.​</​p><p><code·​class="command">gdb</​code>·​has·​quite·​good·​on-​line·​help,​·​as
537 »       ​well·​as·​a·​set·​of·​info·​pages,​·​so·​this·​section·​will·​concentrate537 »       ​well·​as·​a·​set·​of·​info·​pages,​·​so·​this·​section·​will·​concentrate
538 »       ​on·​a·​few·​of·​the·​basic·​commands.​</​p><p>Finally,​·​if·​you·​find·​its·​text-​based·​command-​prompt·​style538 »       ​on·​a·​few·​of·​the·​basic·​commands.​</​p><p>Finally,​·​if·​you·​find·​its·​text-​based·​command-​prompt·​style
539 »       ​off-​putting,​·​there·​is·​a·​graphical·​front-​end·​for·​it·​(<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​ports/​devel.​html"·​target="_top">xxgdb</​a>)​·​in·​the·​ports539 »       ​off-​putting,​·​there·​is·​a·​graphical·​front-​end·​for·​it·​(<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​ports/​devel.​html"·​target="_top">xxgdb</​a>)​·​in·​the·​ports
540 »       ​collection.​</​p><p>This·​section·​is·​intended·​to·​be·​an·​introduction·​to·​using540 »       ​collection.​</​p><p>This·​section·​is·​intended·​to·​be·​an·​introduction·​to·​using
541 »       ​<code·​class="command">gdb</​code>·​and·​does·​not·​cover·​specialized·​topics541 »       ​<code·​class="command">gdb</​code>·​and·​does·​not·​cover·​specialized·​topics
542 »       ​such·​as·​debugging·​the·​kernel.​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60399672"></​a>2.​6.​2.​·​Running·​a·​program·​in·​the·​debugger</​h3></​div></​div></​div><p>You·​will·​need·​to·​have·​compiled·​the·​program·​with·​the542 »       ​such·​as·​debugging·​the·​kernel.​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60508728"></​a>2.​6.​2.​·​Running·​a·​program·​in·​the·​debugger</​h3></​div></​div></​div><p>You·​will·​need·​to·​have·​compiled·​the·​program·​with·​the
543 »       ​<code·​class="option">-​g</​code>·​option·​to·​get·​the·​most·​out·​of·​using543 »       ​<code·​class="option">-​g</​code>·​option·​to·​get·​the·​most·​out·​of·​using
544 »       ​<code·​class="command">gdb</​code>.​··​It·​will·​work·​without,​·​but·​you·​will·​only544 »       ​<code·​class="command">gdb</​code>.​··​It·​will·​work·​without,​·​but·​you·​will·​only
545 »       ​see·​the·​name·​of·​the·​function·​you·​are·​in,​·​instead·​of·​the·​source545 »       ​see·​the·​name·​of·​the·​function·​you·​are·​in,​·​instead·​of·​the·​source
546 »       ​code.​··​If·​you·​see·​a·​line·​like:​</​p><pre·​class="screen">…·​(no·​debugging·​symbols·​found)​·​…</​pre><p>when·​<code·​class="command">gdb</​code>·​starts·​up,​·​you·​will·​know·​that546 »       ​code.​··​If·​you·​see·​a·​line·​like:​</​p><pre·​class="screen">…·​(no·​debugging·​symbols·​found)​·​…</​pre><p>when·​<code·​class="command">gdb</​code>·​starts·​up,​·​you·​will·​know·​that
547 »       ​the·​program·​was·​not·​compiled·​with·​the·​<code·​class="option">-​g</​code>547 »       ​the·​program·​was·​not·​compiled·​with·​the·​<code·​class="option">-​g</​code>
548 »       ​option.​</​p><p>At·​the·​<code·​class="command">gdb</​code>·​prompt,​·​type548 »       ​option.​</​p><p>At·​the·​<code·​class="command">gdb</​code>·​prompt,​·​type
549 »       ​<strong·​class="userinput"><co​de>break·​main</​code></​strong>.​··​This·​will·​tell·​the549 »       ​<strong·​class="userinput"><co​de>break·​main</​code></​strong>.​··​This·​will·​tell·​the
Offset 619, 15 lines modifiedOffset 619, 15 lines modified
619 »       ​··​time·​we·​go·​into·​or·​out·​of·​a·​function,​·​even·​if·​we·​are·​using619 »       ​··​time·​we·​go·​into·​or·​out·​of·​a·​function,​·​even·​if·​we·​are·​using
620 »       ​··​<code·​class="command">up</​code>·​and·​<code·​class="command">down<​/​code>·​to·​move620 »       ​··​<code·​class="command">up</​code>·​and·​<code·​class="command">down<​/​code>·​to·​move
621 »       ​··​around·​the·​call·​stack.​··​This·​shows·​the·​name·​of·​the·​function621 »       ​··​around·​the·​call·​stack.​··​This·​shows·​the·​name·​of·​the·​function
622 »       ​··​and·​the·​values·​of·​its·​arguments,​·​which·​helps·​us·​keep·​track622 »       ​··​and·​the·​values·​of·​its·​arguments,​·​which·​helps·​us·​keep·​track
623 »       ​··​of·​where·​we·​are·​and·​what·​is·​going·​on.​··​(The·​stack·​is·​a623 »       ​··​of·​where·​we·​are·​and·​what·​is·​going·​on.​··​(The·​stack·​is·​a
624 »       ​··​storage·​area·​where·​the·​program·​stores·​information·​about·​the624 »       ​··​storage·​area·​where·​the·​program·​stores·​information·​about·​the
625 »       ​··​arguments·​passed·​to·​functions·​and·​where·​to·​go·​when·​it625 »       ​··​arguments·​passed·​to·​functions·​and·​where·​to·​go·​when·​it
626 »       ​··​returns·​from·​a·​function·​call)​.​</​p></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60554424"></​a>2.​6.​3.​·​Examining·​a·​core·​file</​h3></​div></​div></​div><p>A·​core·​file·​is·​basically·​a·​file·​which·​contains·​the626 »       ​··​returns·​from·​a·​function·​call)​.​</​p></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60609336"></​a>2.​6.​3.​·​Examining·​a·​core·​file</​h3></​div></​div></​div><p>A·​core·​file·​is·​basically·​a·​file·​which·​contains·​the
627 »       ​complete·​state·​of·​the·​process·​when·​it·​crashed.​··​In·​<span·​class="quote">“<span·​class="quote">the627 »       ​complete·​state·​of·​the·​process·​when·​it·​crashed.​··​In·​<span·​class="quote">“<span·​class="quote">the
628 »       ​··​good·​old·​days</​span>”</​span>,​·​programmers·​had·​to·​print·​out·​hex628 »       ​··​good·​old·​days</​span>”</​span>,​·​programmers·​had·​to·​print·​out·​hex
629 »       ​listings·​of·​core·​files·​and·​sweat·​over·​machine·​code·​manuals,​629 »       ​listings·​of·​core·​files·​and·​sweat·​over·​machine·​code·​manuals,​
630 »       ​but·​now·​life·​is·​a·​bit·​easier.​··​Incidentally,​·​under·​FreeBSD·​and630 »       ​but·​now·​life·​is·​a·​bit·​easier.​··​Incidentally,​·​under·​FreeBSD·​and
631 »       ​other·​4.​4BSD·​systems,​·​a·​core·​file·​is·​called631 »       ​other·​4.​4BSD·​systems,​·​a·​core·​file·​is·​called
632 »       ​<code·​class="filename">prog​name.​core</​code>·​instead·​of·​just632 »       ​<code·​class="filename">prog​name.​core</​code>·​instead·​of·​just
633 »       ​<code·​class="filename">core​</​code>,​·​to·​make·​it·​clearer·​which·​program·​a633 »       ​<code·​class="filename">core​</​code>,​·​to·​make·​it·​clearer·​which·​program·​a
Offset 656, 15 lines modifiedOffset 656, 15 lines modified
656 »       ​command·​causes·​<code·​class="command">gdb</​code>·​to·​print·​out·​a656 »       ​command·​causes·​<code·​class="command">gdb</​code>·​to·​print·​out·​a
657 »       ​back-​trace·​of·​the·​call·​stack:​</​p><pre·​class="screen">(gdb)​·​<strong·​class="userinput"><co​de>bt</​code></​strong>657 »       ​back-​trace·​of·​the·​call·​stack:​</​p><pre·​class="screen">(gdb)​·​<strong·​class="userinput"><co​de>bt</​code></​strong>
658 #0··​0x164a·​in·​bazz·​(anint=0x5)​·​at·​temp.​c:​17658 #0··​0x164a·​in·​bazz·​(anint=0x5)​·​at·​temp.​c:​17
659 #1··​0xefbfd888·​in·​end·​()​659 #1··​0xefbfd888·​in·​end·​()​
660 #2··​0x162c·​in·​main·​()​·​at·​temp.​c:​11660 #2··​0x162c·​in·​main·​()​·​at·​temp.​c:​11
661 (gdb)​</​pre><p>The·​<code·​class="function">end(​)​</​code>·​function·​is·​called·​when·​a661 (gdb)​</​pre><p>The·​<code·​class="function">end(​)​</​code>·​function·​is·​called·​when·​a
662 »       ​program·​crashes;​·​in·​this·​case,​·​the·​<code·​class="function">bazz​()​</​code>662 »       ​program·​crashes;​·​in·​this·​case,​·​the·​<code·​class="function">bazz​()​</​code>
663 »       ​function·​was·​called·​from·​<code·​class="function">main​()​</​code>.​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60598584"></​a>2.​6.​4.​·​Attaching·​to·​a·​running·​program</​h3></​div></​div></​div><p>One·​of·​the·​neatest·​features·​about·​<code·​class="command">gdb</​code>663 »       ​function·​was·​called·​from·​<code·​class="function">main​()​</​code>.​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60665912"></​a>2.​6.​4.​·​Attaching·​to·​a·​running·​program</​h3></​div></​div></​div><p>One·​of·​the·​neatest·​features·​about·​<code·​class="command">gdb</​code>
664 »       ​is·​that·​it·​can·​attach·​to·​a·​program·​that·​is·​already·​running.​··​Of664 »       ​is·​that·​it·​can·​attach·​to·​a·​program·​that·​is·​already·​running.​··​Of
665 »       ​course,​·​that·​assumes·​you·​have·​sufficient·​permissions·​to·​do·​so.​665 »       ​course,​·​that·​assumes·​you·​have·​sufficient·​permissions·​to·​do·​so.​
666 »       ​A·​common·​problem·​is·​when·​you·​are·​stepping·​through·​a·​program666 »       ​A·​common·​problem·​is·​when·​you·​are·​stepping·​through·​a·​program
667 »       ​that·​forks,​·​and·​you·​want·​to·​trace·​the·​child,​·​but·​the·​debugger667 »       ​that·​forks,​·​and·​you·​want·​to·​trace·​the·​child,​·​but·​the·​debugger
668 »       ​will·​only·​let·​you·​trace·​the·​parent.​</​p><p>What·​you·​do·​is·​start·​up·​another·​<code·​class="command">gdb</​code>,​668 »       ​will·​only·​let·​you·​trace·​the·​parent.​</​p><p>What·​you·​do·​is·​start·​up·​another·​<code·​class="command">gdb</​code>,​
669 »       ​use·​<code·​class="command">ps</​code>·​to·​find·​the·​process·​ID·​for·​the669 »       ​use·​<code·​class="command">ps</​code>·​to·​find·​the·​process·​ID·​for·​the
670 »       ​child,​·​and·​do</​p><pre·​class="screen">(gdb)​·​<strong·​class="userinput"><co​de>attach·​pid</​code></​strong></​pre><p>in·​<code·​class="command">gdb</​code>,​·​and·​then·​debug·​as·​usual.​</​p><p><span·​class="quote">“<span·​class="quote">That·​is·​all·​very·​well,​</​span>”</​span>·​you·​are·​probably670 »       ​child,​·​and·​do</​p><pre·​class="screen">(gdb)​·​<strong·​class="userinput"><co​de>attach·​pid</​code></​strong></​pre><p>in·​<code·​class="command">gdb</​code>,​·​and·​then·​debug·​as·​usual.​</​p><p><span·​class="quote">“<span·​class="quote">That·​is·​all·​very·​well,​</​span>”</​span>·​you·​are·​probably
Offset 679, 20 lines modifiedOffset 679, 20 lines modified
  
679 »       ​while·​(PauseMode)​679 »       ​while·​(PauseMode)​
680 »       ​»       ​sleep(10)​;​»       ​/​*·​Wait·​until·​someone·​attaches·​to·​us·​*/​680 »       ​»       ​sleep(10)​;​»       ​/​*·​Wait·​until·​someone·​attaches·​to·​us·​*/​
681 »       ​<em·​class="lineannotation​"><span·​class="lineannotation​">…</​span></​em>681 »       ​<em·​class="lineannotation​"><span·​class="lineannotation​">…</​span></​em>
682 }·​else·​{»      ​»       ​»       ​/​*·​parent·​*/​682 }·​else·​{»      ​»       ​»       ​/​*·​parent·​*/​
683 »       ​<em·​class="lineannotation​"><span·​class="lineannotation​">…</​span></​em></​pre><p>Now·​all·​you·​have·​to·​do·​is·​attach·​to·​the·​child,​·​set683 »       ​<em·​class="lineannotation​"><span·​class="lineannotation​">…</​span></​em></​pre><p>Now·​all·​you·​have·​to·​do·​is·​attach·​to·​the·​child,​·​set
684 »       ​<span·​class="symbol">PauseM​ode</​span>·​to·​<code·​class="literal">0</​code>,​·​and·​wait684 »       ​<span·​class="symbol">PauseM​ode</​span>·​to·​<code·​class="literal">0</​code>,​·​and·​wait
685 »       ​for·​the·​<code·​class="function">slee​p()​</​code>·​call·​to·​return!</​p></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="emacs"></​a>2.​7.​·​Using·​Emacs·​as·​a·​Development·​Environment</​h2></​div></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60636472"></​a>2.​7.​1.​·​Emacs</​h3></​div></​div></​div><p>Unfortunately,​·​<span·​class="trademark">UNI​X</​span>®·​systems·​do·​not·​come·​with·​the·​kind·​of685 »       ​for·​the·​<code·​class="function">slee​p()​</​code>·​call·​to·​return!</​p></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="emacs"></​a>2.​7.​·​Using·​Emacs·​as·​a·​Development·​Environment</​h2></​div></​div></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60704312"></​a>2.​7.​1.​·​Emacs</​h3></​div></​div></​div><p>Unfortunately,​·​<span·​class="trademark">UNI​X</​span>®·​systems·​do·​not·​come·​with·​the·​kind·​of
686 »       ​everything-​you-​ever-​wanted-​and-​lots-​more-​you-​did-​not-​in-​one-​gigantic-​package686 »       ​everything-​you-​ever-​wanted-​and-​lots-​more-​you-​did-​not-​in-​one-​gigantic-​package
687 »       ​integrated·​development·​environments·​that·​other·​systems687 »       ​integrated·​development·​environments·​that·​other·​systems
688 »       ​have.​688 »       ​have.​
  
689 »       ​<a·​href="#ftn.​idp60640696"·​class="footnote"·​id="idp60640696"><sup​·​class="footnote">[7]<​/​sup></​a>689 »       ​<a·​href="#ftn.​idp60707896"·​class="footnote"·​id="idp60707896"><sup​·​class="footnote">[7]<​/​sup></​a>
  
690 »       ​However,​·​it·​is·​possible·​to·​set·​up·​your·​own·​environment.​··​It690 »       ​However,​·​it·​is·​possible·​to·​set·​up·​your·​own·​environment.​··​It
691 »       ​may·​not·​be·​as·​pretty,​·​and·​it·​may·​not·​be·​quite·​as·​integrated,​691 »       ​may·​not·​be·​as·​pretty,​·​and·​it·​may·​not·​be·​quite·​as·​integrated,​
692 »       ​but·​you·​can·​set·​it·​up·​the·​way·​you·​want·​it.​··​And·​it·​is·​free.​692 »       ​but·​you·​can·​set·​it·​up·​the·​way·​you·​want·​it.​··​And·​it·​is·​free.​
693 »       ​And·​you·​have·​the·​source·​to·​it.​</​p><p>The·​key·​to·​it·​all·​is·​Emacs.​··​Now·​there·​are·​some·​people·​who693 »       ​And·​you·​have·​the·​source·​to·​it.​</​p><p>The·​key·​to·​it·​all·​is·​Emacs.​··​Now·​there·​are·​some·​people·​who
694 »       ​loathe·​it,​·​but·​many·​who·​love·​it.​··​If·​you·​are·​one·​of·​the·​former,​694 »       ​loathe·​it,​·​but·​many·​who·​love·​it.​··​If·​you·​are·​one·​of·​the·​former,​
695 »       ​I·​am·​afraid·​this·​section·​will·​hold·​little·​of·​interest·​to·​you.​695 »       ​I·​am·​afraid·​this·​section·​will·​hold·​little·​of·​interest·​to·​you.​
Offset 763, 29 lines modifiedOffset 763, 29 lines modified
763 »       ​<span·​class="keysym">x</​span>,​·​press·​<span·​class="keysym">c</​span>·​and·​release·​the763 »       ​<span·​class="keysym">x</​span>,​·​press·​<span·​class="keysym">c</​span>·​and·​release·​the
764 »       ​<span·​class="keysym">contro​l</​span>·​key)​.​··​If·​you·​have·​any·​unsaved·​files764 »       ​<span·​class="keysym">contro​l</​span>·​key)​.​··​If·​you·​have·​any·​unsaved·​files
765 »       ​open,​·​Emacs·​will·​ask·​you·​if·​you·​want·​to·​save·​them.​··​(Ignore765 »       ​open,​·​Emacs·​will·​ask·​you·​if·​you·​want·​to·​save·​them.​··​(Ignore
766 »       ​the·​bit·​in·​the·​documentation·​where·​it·​says766 »       ​the·​bit·​in·​the·​documentation·​where·​it·​says
767 »       ​<code·​class="command">C-​z</​code>·​is·​the·​usual·​way·​to·​leave767 »       ​<code·​class="command">C-​z</​code>·​is·​the·​usual·​way·​to·​leave
768 »       ​Emacs——that·​leaves·​Emacs·​hanging·​around·​in·​the768 »       ​Emacs——that·​leaves·​Emacs·​hanging·​around·​in·​the
769 »       ​background,​·​and·​is·​only·​really·​useful·​if·​you·​are·​on·​a·​system769 »       ​background,​·​and·​is·​only·​really·​useful·​if·​you·​are·​on·​a·​system
770 »       ​which·​does·​not·​have·​virtual·​terminals)​.​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60705592"></​a>2.​7.​2.​·​Configuring·​Emacs</​h3></​div></​div></​div><p>Emacs·​does·​many·​wonderful·​things;​·​some·​of·​them·​are·​built770 »       ​which·​does·​not·​have·​virtual·​terminals)​.​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60772152"></​a>2.​7.​2.​·​Configuring·​Emacs</​h3></​div></​div></​div><p>Emacs·​does·​many·​wonderful·​things;​·​some·​of·​them·​are·​built
771 »       ​in,​·​some·​of·​them·​need·​to·​be·​configured.​</​p><p>Instead·​of·​using·​a·​proprietary·​macro·​language·​for771 »       ​in,​·​some·​of·​them·​need·​to·​be·​configured.​</​p><p>Instead·​of·​using·​a·​proprietary·​macro·​language·​for
772 »       ​configuration,​·​Emacs·​uses·​a·​version·​of·​Lisp·​specially·​adapted772 »       ​configuration,​·​Emacs·​uses·​a·​version·​of·​Lisp·​specially·​adapted
773 »       ​for·​editors,​·​known·​as·​Emacs·​Lisp.​··​Working·​with·​Emacs·​Lisp·​can773 »       ​for·​editors,​·​known·​as·​Emacs·​Lisp.​··​Working·​with·​Emacs·​Lisp·​can
774 »       ​be·​quite·​helpful·​if·​you·​want·​to·​go·​on·​and·​learn·​something·​like774 »       ​be·​quite·​helpful·​if·​you·​want·​to·​go·​on·​and·​learn·​something·​like
775 »       ​Common·​Lisp.​··​Emacs·​Lisp·​has·​many·​features·​of·​Common·​Lisp,​775 »       ​Common·​Lisp.​··​Emacs·​Lisp·​has·​many·​features·​of·​Common·​Lisp,​
776 »       ​although·​it·​is·​considerably·​smaller·​(and·​thus·​easier·​to776 »       ​although·​it·​is·​considerably·​smaller·​(and·​thus·​easier·​to
777 »       ​master)​.​</​p><p>The·​best·​way·​to·​learn·​Emacs·​Lisp·​is·​to·​download·​the·​<a·​class="link"·​href="ftp:​/​/​ftp.​gnu.​org/​old-​gnu/​emacs/​elisp-​manual-​19-​2.​4.​tar.​gz"·​target="_top">Emacs777 »       ​master)​.​</​p><p>The·​best·​way·​to·​learn·​Emacs·​Lisp·​is·​to·​download·​the·​<a·​class="link"·​href="ftp:​/​/​ftp.​gnu.​org/​old-​gnu/​emacs/​elisp-​manual-​19-​2.​4.​tar.​gz"·​target="_top">Emacs
778 »       ​··​Tutorial</​a></​p><p>However,​·​there·​is·​no·​need·​to·​actually·​know·​any·​Lisp·​to·​get778 »       ​··​Tutorial</​a></​p><p>However,​·​there·​is·​no·​need·​to·​actually·​know·​any·​Lisp·​to·​get
779 »       ​started·​with·​configuring·​Emacs,​·​as·​I·​have·​included·​a·​sample779 »       ​started·​with·​configuring·​Emacs,​·​as·​I·​have·​included·​a·​sample
780 »       ​<code·​class="filename">.​emacs</​code>·​file,​·​which·​should·​be·​enough·​to780 »       ​<code·​class="filename">.​emacs</​code>·​file,​·​which·​should·​be·​enough·​to
781 »       ​get·​you·​started.​··​Just·​copy·​it·​into·​your·​home·​directory·​and781 »       ​get·​you·​started.​··​Just·​copy·​it·​into·​your·​home·​directory·​and
782 »       ​restart·​Emacs·​if·​it·​is·​already·​running;​·​it·​will·​read·​the782 »       ​restart·​Emacs·​if·​it·​is·​already·​running;​·​it·​will·​read·​the
783 »       ​commands·​from·​the·​file·​and·​(hopefully)​·​give·​you·​a·​useful·​basic783 »       ​commands·​from·​the·​file·​and·​(hopefully)​·​give·​you·​a·​useful·​basic
784 »       ​setup.​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60713656"></​a>2.​7.​3.​·​A·​sample·​<code·​class="filename">.​emacs</​code>·​file</​h3></​div></​div></​div><p>Unfortunately,​·​there·​is·​far·​too·​much·​here·​to·​explain·​it·​in784 »       ​setup.​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp60792632"></​a>2.​7.​3.​·​A·​sample·​<code·​class="filename">.​emacs</​code>·​file</​h3></​div></​div></​div><p>Unfortunately,​·​there·​is·​far·​too·​much·​here·​to·​explain·​it·​in
785 »       ​detail;​·​however·​there·​are·​one·​or·​two·​points·​worth785 »       ​detail;​·​however·​there·​are·​one·​or·​two·​points·​worth
786 »       ​mentioning.​</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>E​verything·​beginning·​with·​a·​<code·​class="literal">;​</​code>·​is·​a·​comment786 »       ​mentioning.​</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>E​verything·​beginning·​with·​a·​<code·​class="literal">;​</​code>·​is·​a·​comment
787 »       ​····​and·​is·​ignored·​by·​Emacs.​</​p></​li><li·​class="listitem"><p>I​n·​the·​first·​line,​·​the787 »       ​····​and·​is·​ignored·​by·​Emacs.​</​p></​li><li·​class="listitem"><p>I​n·​the·​first·​line,​·​the
788 »       ​····​<code·​class="literal">-​*-​ Emacs-​Lisp -​*-​</​code>·​is·​so·​that788 »       ​····​<code·​class="literal">-​*-​ Emacs-​Lisp -​*-​</​code>·​is·​so·​that
789 »       ​····​we·​can·​edit·​the·​<code·​class="filename">.​emacs</​code>·​file·​itself789 »       ​····​we·​can·​edit·​the·​<code·​class="filename">.​emacs</​code>·​file·​itself
790 »       ​····​within·​Emacs·​and·​get·​all·​the·​fancy·​features·​for·​editing790 »       ​····​within·​Emacs·​and·​get·​all·​the·​fancy·​features·​for·​editing
791 »       ​····​Emacs·​Lisp.​··​Emacs·​usually·​tries·​to·​guess·​this·​based·​on791 »       ​····​Emacs·​Lisp.​··​Emacs·​usually·​tries·​to·​guess·​this·​based·​on
Offset 808, 15 lines modifiedOffset 808, 15 lines modified
808 »       ​····​will·​open·​up·​the·​source·​file·​in·​which·​the·​error·​occurred808 »       ​····​will·​open·​up·​the·​source·​file·​in·​which·​the·​error·​occurred
809 »       ​····​and·​jump·​to·​the·​appropriate·​line.​</​p></​li><li·​class="listitem"><p>W​e·​enable·​Emacs's·​ability·​to·​act·​as·​a·​server,​·​so·​that809 »       ​····​and·​jump·​to·​the·​appropriate·​line.​</​p></​li><li·​class="listitem"><p>W​e·​enable·​Emacs's·​ability·​to·​act·​as·​a·​server,​·​so·​that
810 »       ​····​if·​you·​are·​doing·​something·​outside·​Emacs·​and·​you·​want·​to810 »       ​····​if·​you·​are·​doing·​something·​outside·​Emacs·​and·​you·​want·​to
811 »       ​····​edit·​a·​file,​·​you·​can·​just·​type·​in</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>emacsclient·​filename</​code></​strong>811 »       ​····​edit·​a·​file,​·​you·​can·​just·​type·​in</​p><pre·​class="screen"><code·​class="prompt">%</​code>·​<strong·​class="userinput"><co​de>emacsclient·​filename</​code></​strong>
812 »       ​··​</​pre><p>and·​then·​you·​can·​edit·​the·​file·​in·​your812 »       ​··​</​pre><p>and·​then·​you·​can·​edit·​the·​file·​in·​your
813 »       ​····​Emacs!813 »       ​····​Emacs!
  
814 »       ​····​<a·​href="#ftn.​idp63183800"·​class="footnote"·​id="idp63183800"><sup​·​class="footnote">[8]<​/​sup></​a></​p></​li></​ul></​div><div·​class="example"><a·​id="idp63185592"></​a><div·​class="example-​title">範例·​2.​1.​·​A·​sample·​<code·​class="filename">.​emacs</​code>·​file</​div><div·​class="example-​contents"><pre·​class="programlisting​">;​;​·​-​*-​Emacs-​Lisp-​*-​814 »       ​····​<a·​href="#ftn.​idp63241144"·​class="footnote"·​id="idp63241144"><sup​·​class="footnote">[8]<​/​sup></​a></​p></​li></​ul></​div><div·​class="example"><a·​id="idp63242936"></​a><div·​class="example-​title">範例·​2.​1.​·​A·​sample·​<code·​class="filename">.​emacs</​code>·​file</​div><div·​class="example-​contents"><pre·​class="programlisting​">;​;​·​-​*-​Emacs-​Lisp-​*-​
  
815 ;​;​·​This·​file·​is·​designed·​to·​be·​re-​evaled;​·​use·​the·​variable·​first-​time815 ;​;​·​This·​file·​is·​designed·​to·​be·​re-​evaled;​·​use·​the·​variable·​first-​time
816 ;​;​·​to·​avoid·​any·​problems·​with·​this.​816 ;​;​·​to·​avoid·​any·​problems·​with·​this.​
817 (defvar·​first-​time·​t817 (defvar·​first-​time·​t
818 ··​"Flag·​signifying·​this·​is·​the·​first·​time·​that·​.​emacs·​has·​been·​evaled")​818 ··​"Flag·​signifying·​this·​is·​the·​first·​time·​that·​.​emacs·​has·​been·​evaled")​
  
819 ;​;​·​Meta819 ;​;​·​Meta
Offset 1091, 15 lines modifiedOffset 1091, 15 lines modified
  
1091 ;​;​·​No·​need·​to·​debug·​anything·​now1091 ;​;​·​No·​need·​to·​debug·​anything·​now
  
1092 (setq·​debug-​on-​error·​nil)​1092 (setq·​debug-​on-​error·​nil)​
  
1093 ;​;​·​All·​done1093 ;​;​·​All·​done
1094 (message·​"All·​done,​·​%s%s"·​(user-​login-​name)​·​".​")​1094 (message·​"All·​done,​·​%s%s"·​(user-​login-​name)​·​".​")​
1095 »       ​</​pre></​div></​div><br·​class="example-​break"·​/​></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp63187256"></​a>2.​7.​4.​·​Extending·​the·​Range·​of·​Languages·​Emacs·​Understands</​h3></​div></​div></​div><p>Now,​·​this·​is·​all·​very·​well·​if·​you·​only·​want·​to·​program·​in1095 »       ​</​pre></​div></​div><br·​class="example-​break"·​/​></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp63244600"></​a>2.​7.​4.​·​Extending·​the·​Range·​of·​Languages·​Emacs·​Understands</​h3></​div></​div></​div><p>Now,​·​this·​is·​all·​very·​well·​if·​you·​only·​want·​to·​program·​in
1096 »       ​the·​languages·​already·​catered·​for·​in·​the1096 »       ​the·​languages·​already·​catered·​for·​in·​the
1097 »       ​<code·​class="filename">.​emacs</​code>·​file·​(C,​·​C++,​·​Perl,​·​Lisp·​and1097 »       ​<code·​class="filename">.​emacs</​code>·​file·​(C,​·​C++,​·​Perl,​·​Lisp·​and
1098 »       ​Scheme)​,​·​but·​what·​happens·​if·​a·​new·​language·​called1098 »       ​Scheme)​,​·​but·​what·​happens·​if·​a·​new·​language·​called
1099 »       ​<span·​class="quote">“<span·​class="quote">whizban​g</​span>”</​span>·​comes·​out,​·​full·​of·​exciting1099 »       ​<span·​class="quote">“<span·​class="quote">whizban​g</​span>”</​span>·​comes·​out,​·​full·​of·​exciting
1100 »       ​features?</​p><p>The·​first·​thing·​to·​do·​is·​find·​out·​if·​whizbang·​comes·​with1100 »       ​features?</​p><p>The·​first·​thing·​to·​do·​is·​find·​out·​if·​whizbang·​comes·​with
1101 »       ​any·​files·​that·​tell·​Emacs·​about·​the·​language.​··​These·​usually1101 »       ​any·​files·​that·​tell·​Emacs·​about·​the·​language.​··​These·​usually
1102 »       ​end·​in·​<code·​class="filename">.​el</​code>,​·​short·​for·​<span·​class="quote">“<span·​class="quote">Emacs1102 »       ​end·​in·​<code·​class="filename">.​el</​code>,​·​short·​for·​<span·​class="quote">“<span·​class="quote">Emacs
Offset 1154, 23 lines modifiedOffset 1154, 23 lines modified
1154 »       ​Addison-​Wesley·​19911154 »       ​Addison-​Wesley·​1991
1155 »       ​ISBN·​0-​201-​53992-​6</​p></​li><li·​class="listitem"><p>W​.​·​Richard·​Stevens1155 »       ​ISBN·​0-​201-​53992-​6</​p></​li><li·​class="listitem"><p>W​.​·​Richard·​Stevens
1156 »       ​··​<span·​class="emphasis"><em>​Advanced·​Programming·​in·​the·​Unix·​Environment</​em></​span>1156 »       ​··​<span·​class="emphasis"><em>​Advanced·​Programming·​in·​the·​Unix·​Environment</​em></​span>
1157 »       ​··​Addison-​Wesley·​19921157 »       ​··​Addison-​Wesley·​1992
1158 »       ​··​ISBN·​0-​201-​56317-​7</​p></​li><li·​class="listitem"><p>W​.​·​Richard·​Stevens1158 »       ​··​ISBN·​0-​201-​56317-​7</​p></​li><li·​class="listitem"><p>W​.​·​Richard·​Stevens
1159 »       ​··​<span·​class="emphasis"><em>​Unix·​Network·​Programming</​em></​span>1159 »       ​··​<span·​class="emphasis"><em>​Unix·​Network·​Programming</​em></​span>
1160 »       ​··​Prentice-​Hall·​19901160 »       ​··​Prentice-​Hall·​1990
1161 »       ​··​ISBN·​0-​13-​949876-​1</​p></​li></​ul></​div></​div><div·​class="footnotes"><br​·​/​><hr·​class="footnote-​hr"·​/​><div·​id="ftn.​idp59555000"·​class="footnote"><p><​a·​href="#idp59555000"·​class="para"><sup·​class="para">[1]·​</​sup></​a>如果在提示命令列下執行,那麼有可能會產​生·​core·​dump。</​p></​div><div·​id="ftn.​idp59589560"·​class="footnote"><p><​a·​href="#idp59589560"·​class="para"><sup·​class="para">[2]·​</​sup></​a>嚴格說起來,在這個階段·​<code·​class="command">cc</​code>·​並不是真的把原始程式轉成組合語言,1161 »       ​··​ISBN·​0-​13-​949876-​1</​p></​li></​ul></​div></​div><div·​class="footnotes"><br​·​/​><hr·​class="footnote-​hr"·​/​><div·​id="ftn.​idp59586744"·​class="footnote"><p><​a·​href="#idp59586744"·​class="para"><sup·​class="para">[1]·​</​sup></​a>如果在提示命令列下執行,那麼有可能會產​生·​core·​dump。</​p></​div><div·​id="ftn.​idp59627576"·​class="footnote"><p><​a·​href="#idp59627576"·​class="para"><sup·​class="para">[2]·​</​sup></​a>嚴格說起來,在這個階段·​<code·​class="command">cc</​code>·​並不是真的把原始程式轉成組合語言,
1162 ··········​而是轉為·​machine-​independent·​的·​<em·​class="firstterm">p-​code</​em>。</​p></​div><div·​id="ftn.​idp59619128"·​class="footnote"><p><​a·​href="#idp59619128"·​class="para"><sup·​class="para">[3]·​</​sup></​a>剛所說的·​binary·​sort·​和·​bubble·​sort·​問題,1162 ··········​而是轉為·​machine-​independent·​的·​<em·​class="firstterm">p-​code</​em>。</​p></​div><div·​id="ftn.​idp59675448"·​class="footnote"><p><​a·​href="#idp59675448"·​class="para"><sup·​class="para">[3]·​</​sup></​a>剛所說的·​binary·​sort·​和·​bubble·​sort·​問題,
1163 ··········​在已排序好的序列中,binary·​sort·​搜索效率會比·​bubble·​sort·​好。</​p></​div><div·​id="ftn.​idp59642040"·​class="footnote"><p><​a·​href="#idp59642040"·​class="para"><sup·​class="para">[4]·​</​sup></​a>至於·​<code·​class="option">-​o</​code>·​的原因,則是一團歷史迷霧了。</​p></​div><div·​id="ftn.​idp59714488"·​class="footnote"><p><​a·​href="#idp59714488"·​class="para"><sup·​class="para">[5]·​</​sup></​a>請注意,因為上例沒用·​<code·​class="option">-​o</​code>·​以指定執行檔名稱,1163 ··········​在已排序好的序列中,binary·​sort·​搜索效率會比·​bubble·​sort·​好。</​p></​div><div·​id="ftn.​idp59687096"·​class="footnote"><p><​a·​href="#idp59687096"·​class="para"><sup·​class="para">[4]·​</​sup></​a>至於·​<code·​class="option">-​o</​code>·​的原因,則是一團歷史迷霧了。</​p></​div><div·​id="ftn.​idp59758136"·​class="footnote"><p><​a·​href="#idp59758136"·​class="para"><sup·​class="para">[5]·​</​sup></​a>請注意,因為上例沒用·​<code·​class="option">-​o</​code>·​以指定執行檔名稱,
1164 »       ​········​所以執行檔會是·​<code·​class="filename">a.​out</​code>·​這檔。1164 »       ​········​所以執行檔會是·​<code·​class="filename">a.​out</​code>·​這檔。
1165 »       ​········​那麼,要如何產生·​<code·​class="filename">foob​ar</​code>·​的執行檔並內含除錯訊息,1165 »       ​········​那麼,要如何產生·​<code·​class="filename">foob​ar</​code>·​的執行檔並內含除錯訊息,
1166 »       ​········​這就留待看倌們練習一下囉。</​p></​div><div·​id="ftn.​idp60160696"·​class="footnote"><p><​a·​href="#idp60160696"·​class="para"><sup·​class="para">[6]·​</​sup></​a>They·​do·​not·​use·​the·​<code·​class="filename">MAKE​FILE</​code>·​form1166 »       ​········​這就留待看倌們練習一下囉。</​p></​div><div·​id="ftn.​idp60223672"·​class="footnote"><p><​a·​href="#idp60223672"·​class="para"><sup·​class="para">[6]·​</​sup></​a>They·​do·​not·​use·​the·​<code·​class="filename">MAKE​FILE</​code>·​form
1167 »       ​····​as·​block·​capitals·​are·​often·​used·​for·​documentation·​files1167 »       ​····​as·​block·​capitals·​are·​often·​used·​for·​documentation·​files
1168 »       ​····​like·​<code·​class="filename">READ​ME</​code>.​</​p></​div><div·​id="ftn.​idp60640696"·​class="footnote"><p><​a·​href="#idp60640696"·​class="para"><sup·​class="para">[7]·​</​sup></​a>Some·​powerful,​·​free·​IDEs·​now·​exist,​·​such·​as·​KDevelop1168 »       ​····​like·​<code·​class="filename">READ​ME</​code>.​</​p></​div><div·​id="ftn.​idp60707896"·​class="footnote"><p><​a·​href="#idp60707896"·​class="para"><sup·​class="para">[7]·​</​sup></​a>Some·​powerful,​·​free·​IDEs·​now·​exist,​·​such·​as·​KDevelop
1169 »       ​····​in·​the·​ports·​collection.​</​p></​div><div·​id="ftn.​idp63183800"·​class="footnote"><p><​a·​href="#idp63183800"·​class="para"><sup·​class="para">[8]·​</​sup></​a>Many·​Emacs·​users·​set·​their·​<code·​class="envar">EDITOR<​/​code>1169 »       ​····​in·​the·​ports·​collection.​</​p></​div><div·​id="ftn.​idp63241144"·​class="footnote"><p><​a·​href="#idp63241144"·​class="para"><sup·​class="para">[8]·​</​sup></​a>Many·​Emacs·​users·​set·​their·​<code·​class="envar">EDITOR<​/​code>
1170 »       ​»       ​environment·​to1170 »       ​»       ​environment·​to
1171 »       ​»       ​<code·​class="literal">emacs​client</​code>·​so·​this·​happens·​every1171 »       ​»       ​<code·​class="literal">emacs​client</​code>·​so·​this·​happens·​every
1172 »       ​»       ​time·​they·​need·​to·​edit·​a·​file.​</​p></​div></​div></​div><div·​class="chapter"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="secure"></​a>章·​3.​·​Secure·​Programming</​h2></​div><div><span·​class="authorgroup">C​ontributed·​by·​<span·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><span·​class="firstname">Mur​ray</​span>·​<span·​class="surname">Stoke​ly</​span></​span>.​·​</​span></​div></​div></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="sect1"><a·​href="#secure-​synopsis">3.​1.​·​Synopsis</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​philosophy">3.​2.​·​Secure·​Design1172 »       ​»       ​time·​they·​need·​to·​edit·​a·​file.​</​p></​div></​div></​div><div·​class="chapter"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="secure"></​a>章·​3.​·​Secure·​Programming</​h2></​div><div><span·​class="authorgroup">C​ontributed·​by·​<span·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><span·​class="firstname">Mur​ray</​span>·​<span·​class="surname">Stoke​ly</​span></​span>.​·​</​span></​div></​div></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="sect1"><a·​href="#secure-​synopsis">3.​1.​·​Synopsis</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​philosophy">3.​2.​·​Secure·​Design
1173 ······​Methodology</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​bufferov">3.​3.​·​Buffer·​Overflows</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​setuid">3.​4.​·​SetUID·​issues</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​chroot">3.​5.​·​Limiting·​your·​program's·​environment</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​trust">3.​6.​·​Trust</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​race-​conditions">3.​7.​·​Race·​Conditions</​a></​span></​dt></​dl></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="secure-​synopsis"></​a>3.​1.​·​Synopsis</​h2></​div></​div></​div><p>This·​chapter·​describes·​some·​of·​the·​security·​issues·​that1173 ······​Methodology</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​bufferov">3.​3.​·​Buffer·​Overflows</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​setuid">3.​4.​·​SetUID·​issues</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​chroot">3.​5.​·​Limiting·​your·​program's·​environment</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​trust">3.​6.​·​Trust</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#secure-​race-​conditions">3.​7.​·​Race·​Conditions</​a></​span></​dt></​dl></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="secure-​synopsis"></​a>3.​1.​·​Synopsis</​h2></​div></​div></​div><p>This·​chapter·​describes·​some·​of·​the·​security·​issues·​that
1174 ······​have·​plagued·​<span·​class="trademark">UNI​X</​span>®·​programmers·​for·​decades·​and·​some·​of·​the·​new1174 ······​have·​plagued·​<span·​class="trademark">UNI​X</​span>®·​programmers·​for·​decades·​and·​some·​of·​the·​new
1175 ······​tools·​available·​to·​help·​programmers·​avoid·​writing·​exploitable1175 ······​tools·​available·​to·​help·​programmers·​avoid·​writing·​exploitable
1176 ······​code.​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="secure-​philosophy"></​a>3.​2.​·​Secure·​Design1176 ······​code.​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="secure-​philosophy"></​a>3.​2.​·​Secure·​Design
Offset 1184, 54 lines modifiedOffset 1184, 54 lines modified
1184 ······​is·​to·​make·​assumptions·​about·​the·​sanity·​of·​the·​environment.​1184 ······​is·​to·​make·​assumptions·​about·​the·​sanity·​of·​the·​environment.​
1185 ······​Applications·​should·​never·​trust·​user·​input·​(in·​all·​its·​forms)​,​1185 ······​Applications·​should·​never·​trust·​user·​input·​(in·​all·​its·​forms)​,​
1186 ······​system·​resources,​·​inter-​process·​communication,​·​or·​the·​timing·​of1186 ······​system·​resources,​·​inter-​process·​communication,​·​or·​the·​timing·​of
1187 ······​events.​··​<span·​class="trademark">UNI​X</​span>®·​processes·​do·​not·​execute·​synchronously·​so·​logical1187 ······​events.​··​<span·​class="trademark">UNI​X</​span>®·​processes·​do·​not·​execute·​synchronously·​so·​logical
1188 ······​operations·​are·​rarely·​atomic.​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="secure-​bufferov"></​a>3.​3.​·​Buffer·​Overflows</​h2></​div></​div></​div><p>Buffer·​Overflows·​have·​been·​around·​since·​the·​very1188 ······​operations·​are·​rarely·​atomic.​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="secure-​bufferov"></​a>3.​3.​·​Buffer·​Overflows</​h2></​div></​div></​div><p>Buffer·​Overflows·​have·​been·​around·​since·​the·​very
1189 ······​beginnings·​of·​the·​Von-​Neuman·​<a·​class="xref"·​href="#COD">1</​a>·​architecture.​1189 ······​beginnings·​of·​the·​Von-​Neuman·​<a·​class="xref"·​href="#COD">1</​a>·​architecture.​
  
1190 ······​<a·​id="idp63406904"·​class="indexterm"></​a>1190 ······​<a·​id="idp63472440"·​class="indexterm"></​a>
1191 ······​<a·​id="idp63407416"·​class="indexterm"></​a>1191 ······​<a·​id="idp63472952"·​class="indexterm"></​a>
  
1192 ······​They·​first·​gained·​widespread·​notoriety·​in·​1988·​with·​the·​Morris1192 ······​They·​first·​gained·​widespread·​notoriety·​in·​1988·​with·​the·​Morris
1193 ······​Internet·​worm.​··​Unfortunately,​·​the·​same·​basic·​attack·​remains1193 ······​Internet·​worm.​··​Unfortunately,​·​the·​same·​basic·​attack·​remains
  
1194 ······​<a·​id="idp63407928"·​class="indexterm"></​a>1194 ······​<a·​id="idp63473464"·​class="indexterm"></​a>
  
1195 ······​effective·​today.​··​Of·​the·​17·​CERT·​security·​advisories·​of·​1999,​·​101195 ······​effective·​today.​··​Of·​the·​17·​CERT·​security·​advisories·​of·​1999,​·​10
  
1196 ······​<a·​id="idp63408440"·​class="indexterm"></​a>1196 ······​<a·​id="idp63473976"·​class="indexterm"></​a>
  
1197 ······​of·​them·​were·​directly·​caused·​by·​buffer-​overflow·​software·​bugs.​1197 ······​of·​them·​were·​directly·​caused·​by·​buffer-​overflow·​software·​bugs.​
1198 ······​By·​far·​the·​most·​common·​type·​of·​buffer·​overflow·​attack·​is·​based1198 ······​By·​far·​the·​most·​common·​type·​of·​buffer·​overflow·​attack·​is·​based
1199 ······​on·​corrupting·​the·​stack.​</​p><a·​id="idp63409592"·​class="indexterm"></​a><a·​id="idp63410104"·​class="indexterm"></​a><p>Most·​modern·​computer·​systems·​use·​a·​stack·​to·​pass·​arguments1199 ······​on·​corrupting·​the·​stack.​</​p><a·​id="idp63479224"·​class="indexterm"></​a><a·​id="idp63479736"·​class="indexterm"></​a><p>Most·​modern·​computer·​systems·​use·​a·​stack·​to·​pass·​arguments
1200 ······​to·​procedures·​and·​to·​store·​local·​variables.​··​A·​stack·​is·​a·​last1200 ······​to·​procedures·​and·​to·​store·​local·​variables.​··​A·​stack·​is·​a·​last
1201 ······​in·​first·​out·​(LIFO)​·​buffer·​in·​the·​high·​memory·​area·​of·​a·​process1201 ······​in·​first·​out·​(LIFO)​·​buffer·​in·​the·​high·​memory·​area·​of·​a·​process
1202 ······​image.​··​When·​a·​program·​invokes·​a·​function·​a·​new·​"stack·​frame"·​is1202 ······​image.​··​When·​a·​program·​invokes·​a·​function·​a·​new·​"stack·​frame"·​is
  
1203 ······​<a·​id="idp63410872"·​class="indexterm"></​a>1203 ······​<a·​id="idp63480504"·​class="indexterm"></​a>
1204 ······​<a·​id="idp63411384"·​class="indexterm"></​a>1204 ······​<a·​id="idp63481016"·​class="indexterm"></​a>
  
1205 ······​created.​··​This·​stack·​frame·​consists·​of·​the·​arguments·​passed·​to1205 ······​created.​··​This·​stack·​frame·​consists·​of·​the·​arguments·​passed·​to
1206 ······​the·​function·​as·​well·​as·​a·​dynamic·​amount·​of·​local·​variable1206 ······​the·​function·​as·​well·​as·​a·​dynamic·​amount·​of·​local·​variable
1207 ······​space.​··​The·​"stack·​pointer"·​is·​a·​register·​that·​holds·​the·​current1207 ······​space.​··​The·​"stack·​pointer"·​is·​a·​register·​that·​holds·​the·​current
  
1208 ······​<a·​id="idp63412536"·​class="indexterm"></​a>1208 ······​<a·​id="idp63482168"·​class="indexterm"></​a>
1209 ······​<a·​id="idp63413048"·​class="indexterm"></​a>1209 ······​<a·​id="idp63482680"·​class="indexterm"></​a>
  
1210 ······​location·​of·​the·​top·​of·​the·​stack.​··​Since·​this·​value·​is1210 ······​location·​of·​the·​top·​of·​the·​stack.​··​Since·​this·​value·​is
1211 ······​constantly·​changing·​as·​new·​values·​are·​pushed·​onto·​the·​top·​of·​the1211 ······​constantly·​changing·​as·​new·​values·​are·​pushed·​onto·​the·​top·​of·​the
1212 ······​stack,​·​many·​implementations·​also·​provide·​a·​"frame·​pointer"·​that1212 ······​stack,​·​many·​implementations·​also·​provide·​a·​"frame·​pointer"·​that
1213 ······​is·​located·​near·​the·​beginning·​of·​a·​stack·​frame·​so·​that·​local1213 ······​is·​located·​near·​the·​beginning·​of·​a·​stack·​frame·​so·​that·​local
1214 ······​variables·​can·​more·​easily·​be·​addressed·​relative·​to·​this1214 ······​variables·​can·​more·​easily·​be·​addressed·​relative·​to·​this
1215 ······​value.​·​<a·​class="xref"·​href="#COD">1</​a>·​The·​return·​address·​for·​function1215 ······​value.​·​<a·​class="xref"·​href="#COD">1</​a>·​The·​return·​address·​for·​function
  
1216 ······​<a·​id="idp63413944"·​class="indexterm"></​a>1216 ······​<a·​id="idp63483576"·​class="indexterm"></​a>
1217 ······​<a·​id="idp63414456"·​class="indexterm"></​a>1217 ······​<a·​id="idp63484088"·​class="indexterm"></​a>
1218 ······​<a·​id="idp63415608"·​class="indexterm"></​a>1218 ······​<a·​id="idp63485240"·​class="indexterm"></​a>
1219 ······​<a·​id="idp63416120"·​class="indexterm"></​a>1219 ······​<a·​id="idp63485752"·​class="indexterm"></​a>
  
1220 ······​calls·​is·​also·​stored·​on·​the·​stack,​·​and·​this·​is·​the·​cause·​of1220 ······​calls·​is·​also·​stored·​on·​the·​stack,​·​and·​this·​is·​the·​cause·​of
1221 ······​stack-​overflow·​exploits·​since·​overflowing·​a·​local·​variable·​in·​a1221 ······​stack-​overflow·​exploits·​since·​overflowing·​a·​local·​variable·​in·​a
1222 ······​function·​can·​overwrite·​the·​return·​address·​of·​that·​function,​1222 ······​function·​can·​overwrite·​the·​return·​address·​of·​that·​function,​
1223 ······​potentially·​allowing·​a·​malicious·​user·​to·​execute·​any·​code·​he·​or1223 ······​potentially·​allowing·​a·​malicious·​user·​to·​execute·​any·​code·​he·​or
1224 ······​she·​wants.​</​p><p>Although·​stack-​based·​attacks·​are·​by·​far·​the·​most·​common,​1224 ······​she·​wants.​</​p><p>Although·​stack-​based·​attacks·​are·​by·​far·​the·​most·​common,​
1225 ······​it·​would·​also·​be·​possible·​to·​overrun·​the·​stack·​with·​a·​heap-​based1225 ······​it·​would·​also·​be·​possible·​to·​overrun·​the·​stack·​with·​a·​heap-​based
Offset 1239, 15 lines modifiedOffset 1239, 15 lines modified
1239 ······​bounds·​checking·​on·​arrays·​or·​pointers·​as·​many·​other·​languages1239 ······​bounds·​checking·​on·​arrays·​or·​pointers·​as·​many·​other·​languages
1240 ······​do.​··​In·​addition,​·​the·​standard·​C·​library·​is·​filled·​with·​a1240 ······​do.​··​In·​addition,​·​the·​standard·​C·​library·​is·​filled·​with·​a
1241 ······​handful·​of·​very·​dangerous·​functions.​</​p><div·​class="informaltable"​><table·​width="100%"·​border="0"><colgroup>​<col·​/​><col·​/​></​colgroup><tbody><tr><​td><code·​class="function">strc​py</​code>(char·​*dest,​·​const·​char1241 ······​handful·​of·​very·​dangerous·​functions.​</​p><div·​class="informaltable"​><table·​width="100%"·​border="0"><colgroup>​<col·​/​><col·​/​></​colgroup><tbody><tr><​td><code·​class="function">strc​py</​code>(char·​*dest,​·​const·​char
1242 ··········​*src)​</​td><td><p>May·​overflow·​the·​dest·​buffer</​p></​td></​tr><tr><td><code·​class="function">strc​at</​code>(char·​*dest,​·​const·​char1242 ··········​*src)​</​td><td><p>May·​overflow·​the·​dest·​buffer</​p></​td></​tr><tr><td><code·​class="function">strc​at</​code>(char·​*dest,​·​const·​char
1243 ··········​*src)​</​td><td><p>May·​overflow·​the·​dest·​buffer</​p></​td></​tr><tr><td><code·​class="function">getw​d</​code>(char·​*buf)​</​td><td><p>May·​overflow·​the·​buf·​buffer</​p></​td></​tr><tr><td><code·​class="function">gets​</​code>(char·​*s)​</​td><td><p>May·​overflow·​the·​s·​buffer</​p></​td></​tr><tr><td><code·​class="function">[vf]​scanf</​code>(const·​char·​*format,​1243 ··········​*src)​</​td><td><p>May·​overflow·​the·​dest·​buffer</​p></​td></​tr><tr><td><code·​class="function">getw​d</​code>(char·​*buf)​</​td><td><p>May·​overflow·​the·​buf·​buffer</​p></​td></​tr><tr><td><code·​class="function">gets​</​code>(char·​*s)​</​td><td><p>May·​overflow·​the·​s·​buffer</​p></​td></​tr><tr><td><code·​class="function">[vf]​scanf</​code>(const·​char·​*format,​
1244 ··········​.​.​.​)​</​td><td><p>May·​overflow·​its·​arguments.​</​p></​td></​tr><tr><td><code·​class="function">real​path</​code>(char·​*path,​·​char1244 ··········​.​.​.​)​</​td><td><p>May·​overflow·​its·​arguments.​</​p></​td></​tr><tr><td><code·​class="function">real​path</​code>(char·​*path,​·​char
1245 ··········​resolved_path[])​</​td><td><p>May·​overflow·​the·​path·​buffer</​p></​td></​tr><tr><td><code·​class="function">[v]s​printf</​code>(char·​*str,​·​const·​char1245 ··········​resolved_path[])​</​td><td><p>May·​overflow·​the·​path·​buffer</​p></​td></​tr><tr><td><code·​class="function">[v]s​printf</​code>(char·​*str,​·​const·​char
1246 ··········​*format,​·​.​.​.​)​</​td><td><p>May·​overflow·​the·​str·​buffer.​</​p></​td></​tr></​tbody></​table></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp63428920"></​a>3.​3.​1.​·​Example·​Buffer·​Overflow</​h3></​div></​div></​div><p>The·​following·​example·​code·​contains·​a·​buffer·​overflow1246 ··········​*format,​·​.​.​.​)​</​td><td><p>May·​overflow·​the·​str·​buffer.​</​p></​td></​tr></​tbody></​table></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp63498552"></​a>3.​3.​1.​·​Example·​Buffer·​Overflow</​h3></​div></​div></​div><p>The·​following·​example·​code·​contains·​a·​buffer·​overflow
1247 ······​designed·​to·​overwrite·​the·​return·​address·​and·​skip·​the1247 ······​designed·​to·​overwrite·​the·​return·​address·​and·​skip·​the
1248 ······​instruction·​immediately·​following·​the·​function·​call.​··​(Inspired1248 ······​instruction·​immediately·​following·​the·​function·​call.​··​(Inspired
1249 ······​by·​<a·​class="xref"·​href="#Phrack">4</​a>)​</​p><pre·​class="programlisting​">#include·​<code·​class="sgmltag-​element">stdio.​h</​code>1249 ······​by·​<a·​class="xref"·​href="#Phrack">4</​a>)​</​p><pre·​class="programlisting​">#include·​<code·​class="sgmltag-​element">stdio.​h</​code>
  
1250 void·​manipulate(char·​*buffer)​·​{1250 void·​manipulate(char·​*buffer)​·​{
1251 ··​char·​newbuffer[80];​1251 ··​char·​newbuffer[80];​
1252 ··​strcpy(newbuffer,​buffer)​;​1252 ··​strcpy(newbuffer,​buffer)​;​
Offset 1263, 53 lines modifiedOffset 1263, 53 lines modified
1263 ··​manipulate(buffer)​;​1263 ··​manipulate(buffer)​;​
1264 ··​i=2;​1264 ··​i=2;​
1265 ··​printf("The·​value·​of·​i·​is·​:​·​%d\n",​i)​;​1265 ··​printf("The·​value·​of·​i·​is·​:​·​%d\n",​i)​;​
1266 ··​return·​0;​1266 ··​return·​0;​
1267 }</​pre><p>Let·​us·​examine·​what·​the·​memory·​image·​of·​this·​process·​would1267 }</​pre><p>Let·​us·​examine·​what·​the·​memory·​image·​of·​this·​process·​would
1268 ······​look·​like·​if·​we·​were·​to·​input·​160·​spaces·​into·​our·​little·​program1268 ······​look·​like·​if·​we·​were·​to·​input·​160·​spaces·​into·​our·​little·​program
1269 ······​before·​hitting·​return.​</​p><p>[XXX·​figure·​here!]</​p><p>Obviously·​more·​malicious·​input·​can·​be·​devised·​to·​execute1269 ······​before·​hitting·​return.​</​p><p>[XXX·​figure·​here!]</​p><p>Obviously·​more·​malicious·​input·​can·​be·​devised·​to·​execute
1270 ······​actual·​compiled·​instructions·​(such·​as·​exec(/​bin/​sh)​)​.​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp63432376"></​a>3.​3.​2.​·​Avoiding·​Buffer·​Overflows</​h3></​div></​div></​div><p>The·​most·​straightforward·​solution·​to·​the·​problem·​of1270 ······​actual·​compiled·​instructions·​(such·​as·​exec(/​bin/​sh)​)​.​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp63502008"></​a>3.​3.​2.​·​Avoiding·​Buffer·​Overflows</​h3></​div></​div></​div><p>The·​most·​straightforward·​solution·​to·​the·​problem·​of
1271 ······​stack-​overflows·​is·​to·​always·​use·​length·​restricted·​memory·​and1271 ······​stack-​overflows·​is·​to·​always·​use·​length·​restricted·​memory·​and
1272 ······​string·​copy·​functions.​··​<code·​class="function">strn​cpy</​code>·​and1272 ······​string·​copy·​functions.​··​<code·​class="function">strn​cpy</​code>·​and
1273 ······​<code·​class="function">strn​cat</​code>·​are·​part·​of·​the·​standard·​C·​library.​1273 ······​<code·​class="function">strn​cat</​code>·​are·​part·​of·​the·​standard·​C·​library.​
  
1274 ······​<a·​id="idp63433912"·​class="indexterm"></​a>1274 ······​<a·​id="idp63503544"·​class="indexterm"></​a>
1275 ······​<a·​id="idp63435064"·​class="indexterm"></​a>1275 ······​<a·​id="idp63504696"·​class="indexterm"></​a>
  
1276 ······​These·​functions·​accept·​a·​length·​value·​as·​a·​parameter·​which1276 ······​These·​functions·​accept·​a·​length·​value·​as·​a·​parameter·​which
1277 ······​should·​be·​no·​larger·​than·​the·​size·​of·​the·​destination·​buffer.​1277 ······​should·​be·​no·​larger·​than·​the·​size·​of·​the·​destination·​buffer.​
1278 ······​These·​functions·​will·​then·​copy·​up·​to·​`length'·​bytes·​from·​the1278 ······​These·​functions·​will·​then·​copy·​up·​to·​`length'·​bytes·​from·​the
1279 ······​source·​to·​the·​destination.​··​However·​there·​are·​a·​number·​of1279 ······​source·​to·​the·​destination.​··​However·​there·​are·​a·​number·​of
1280 ······​problems·​with·​these·​functions.​··​Neither·​function·​guarantees·​NUL1280 ······​problems·​with·​these·​functions.​··​Neither·​function·​guarantees·​NUL
1281 ······​termination·​if·​the·​size·​of·​the·​input·​buffer·​is·​as·​large·​as·​the1281 ······​termination·​if·​the·​size·​of·​the·​input·​buffer·​is·​as·​large·​as·​the
  
1282 ······​<a·​id="idp63436216"·​class="indexterm"></​a>1282 ······​<a·​id="idp63505848"·​class="indexterm"></​a>
  
1283 ······​destination.​··​The·​length·​parameter·​is·​also·​used·​inconsistently1283 ······​destination.​··​The·​length·​parameter·​is·​also·​used·​inconsistently
1284 ······​between·​strncpy·​and·​strncat·​so·​it·​is·​easy·​for·​programmers·​to·​get1284 ······​between·​strncpy·​and·​strncat·​so·​it·​is·​easy·​for·​programmers·​to·​get
1285 ······​confused·​as·​to·​their·​proper·​usage.​··​There·​is·​also·​a·​significant1285 ······​confused·​as·​to·​their·​proper·​usage.​··​There·​is·​also·​a·​significant
1286 ······​performance·​loss·​compared·​to·​<code·​class="function">strc​py</​code>·​when1286 ······​performance·​loss·​compared·​to·​<code·​class="function">strc​py</​code>·​when
1287 ······​copying·​a·​short·​string·​into·​a·​large·​buffer·​since1287 ······​copying·​a·​short·​string·​into·​a·​large·​buffer·​since
1288 ······​<code·​class="function">strn​cpy</​code>·​NUL·​fills·​up·​the·​size1288 ······​<code·​class="function">strn​cpy</​code>·​NUL·​fills·​up·​the·​size
1289 ······​specified.​</​p><p>In·​OpenBSD,​·​another·​memory·​copy·​implementation·​has·​been1289 ······​specified.​</​p><p>In·​OpenBSD,​·​another·​memory·​copy·​implementation·​has·​been
  
1290 ······​<a·​id="idp63437880"·​class="indexterm"></​a>1290 ······​<a·​id="idp63507512"·​class="indexterm"></​a>
  
1291 ······​created·​to·​get·​around·​these·​problem.​··​The1291 ······​created·​to·​get·​around·​these·​problem.​··​The
1292 ······​<code·​class="function">strl​cpy</​code>·​and·​<code·​class="function">strl​cat</​code>1292 ······​<code·​class="function">strl​cpy</​code>·​and·​<code·​class="function">strl​cat</​code>
1293 ······​functions·​guarantee·​that·​they·​will·​always·​null·​terminate·​the1293 ······​functions·​guarantee·​that·​they·​will·​always·​null·​terminate·​the
1294 ······​destination·​string·​when·​given·​a·​non-​zero·​length·​argument.​··​For1294 ······​destination·​string·​when·​given·​a·​non-​zero·​length·​argument.​··​For
1295 ······​more·​information·​about·​these·​functions·​see·​<a·​class="xref"·​href="#OpenBSD">6</​a>.​··​The·​OpenBSD·​<code·​class="function">strl​cpy</​code>·​and1295 ······​more·​information·​about·​these·​functions·​see·​<a·​class="xref"·​href="#OpenBSD">6</​a>.​··​The·​OpenBSD·​<code·​class="function">strl​cpy</​code>·​and
1296 ······​<code·​class="function">strl​cat</​code>·​instructions·​have·​been·​in·​FreeBSD1296 ······​<code·​class="function">strl​cat</​code>·​instructions·​have·​been·​in·​FreeBSD
1297 ······​since·​3.​3.​</​p><a·​id="idp63440440"·​class="indexterm"></​a><a·​id="idp63441592"·​class="indexterm"></​a><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp63446840"></​a>3.​3.​2.​1.​·​Compiler·​based·​run-​time·​bounds·​checking</​h4></​div></​div></​div><a·​id="idp63447352"·​class="indexterm"></​a><p>Unfortunately·​there·​is·​still·​a·​very·​large·​assortment·​of1297 ······​since·​3.​3.​</​p><a·​id="idp63510072"·​class="indexterm"></​a><a·​id="idp63511224"·​class="indexterm"></​a><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp63516472"></​a>3.​3.​2.​1.​·​Compiler·​based·​run-​time·​bounds·​checking</​h4></​div></​div></​div><a·​id="idp63516984"·​class="indexterm"></​a><p>Unfortunately·​there·​is·​still·​a·​very·​large·​assortment·​of
1298 ········​code·​in·​public·​use·​which·​blindly·​copies·​memory·​around·​without1298 ········​code·​in·​public·​use·​which·​blindly·​copies·​memory·​around·​without
1299 ········​using·​any·​of·​the·​bounded·​copy·​routines·​we·​just·​discussed.​1299 ········​using·​any·​of·​the·​bounded·​copy·​routines·​we·​just·​discussed.​
1300 ········​Fortunately,​·​there·​is·​another·​solution.​··​Several·​compiler1300 ········​Fortunately,​·​there·​is·​another·​solution.​··​Several·​compiler
1301 ········​add-​ons·​and·​libraries·​exist·​to·​do·​Run-​time·​bounds·​checking·​in1301 ········​add-​ons·​and·​libraries·​exist·​to·​do·​Run-​time·​bounds·​checking·​in
1302 ········​C/​C++.​</​p><a·​id="idp63448632"·​class="indexterm"></​a><a·​id="idp63449144"·​class="indexterm"></​a><p>StackGuard·​is·​one·​such·​add-​on·​that·​is·​implemented·​as·​a1302 ········​C/​C++.​</​p><a·​id="idp63518264"·​class="indexterm"></​a><a·​id="idp63518776"·​class="indexterm"></​a><p>StackGuard·​is·​one·​such·​add-​on·​that·​is·​implemented·​as·​a
1303 ········​small·​patch·​to·​the·​gcc·​code·​generator.​··​From·​the·​<a·​class="link"·​href="http:​/​/​immunix.​org/​stackguard.​html"·​target="_top">StackGu​ard1303 ········​small·​patch·​to·​the·​gcc·​code·​generator.​··​From·​the·​<a·​class="link"·​href="http:​/​/​immunix.​org/​stackguard.​html"·​target="_top">StackGu​ard
1304 ··········​website</​a>:​1304 ··········​website</​a>:​
  
1305 ········​</​p><div·​class="blockquote"><b​lockquote·​class="blockquote"><p​>"StackGuard·​detects·​and·​defeats·​stack1305 ········​</​p><div·​class="blockquote"><b​lockquote·​class="blockquote"><p​>"StackGuard·​detects·​and·​defeats·​stack
1306 ········​smashing·​attacks·​by·​protecting·​the·​return·​address·​on·​the·​stack1306 ········​smashing·​attacks·​by·​protecting·​the·​return·​address·​on·​the·​stack
1307 ········​from·​being·​altered.​··​StackGuard·​places·​a·​"canary"·​word·​next·​to1307 ········​from·​being·​altered.​··​StackGuard·​places·​a·​"canary"·​word·​next·​to
1308 ········​the·​return·​address·​when·​a·​function·​is·​called.​··​If·​the·​canary1308 ········​the·​return·​address·​when·​a·​function·​is·​called.​··​If·​the·​canary
Offset 1322, 41 lines modifiedOffset 1322, 41 lines modified
1322 ········​to·​the·​gcc·​code·​generator,​·​specifically·​the·​function_prolog()​1322 ········​to·​the·​gcc·​code·​generator,​·​specifically·​the·​function_prolog()​
1323 ········​and·​function_epilog()​·​routines.​··​function_prolog()​·​has·​been1323 ········​and·​function_epilog()​·​routines.​··​function_prolog()​·​has·​been
1324 ········​enhanced·​to·​lay·​down·​canaries·​on·​the·​stack·​when·​functions1324 ········​enhanced·​to·​lay·​down·​canaries·​on·​the·​stack·​when·​functions
1325 ········​start,​·​and·​function_epilog()​·​checks·​canary·​integrity·​when·​the1325 ········​start,​·​and·​function_epilog()​·​checks·​canary·​integrity·​when·​the
1326 ········​function·​exits.​··​Any·​attempt·​at·​corrupting·​the·​return·​address1326 ········​function·​exits.​··​Any·​attempt·​at·​corrupting·​the·​return·​address
1327 ········​is·​thus·​detected·​before·​the·​function1327 ········​is·​thus·​detected·​before·​the·​function
1328 ········​returns.​"</​p></​blockquote></​div><p>1328 ········​returns.​"</​p></​blockquote></​div><p>
1329 ········​</​p><a·​id="idp63463992"·​class="indexterm"></​a><p>Recompiling·​your·​application·​with·​StackGuard·​is·​an1329 ········​</​p><a·​id="idp63521336"·​class="indexterm"></​a><p>Recompiling·​your·​application·​with·​StackGuard·​is·​an
1330 ········​effective·​means·​of·​stopping·​most·​buffer-​overflow·​attacks,​·​but1330 ········​effective·​means·​of·​stopping·​most·​buffer-​overflow·​attacks,​·​but
1331 ········​it·​can·​still·​be·​compromised.​</​p></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp63465016"></​a>3.​3.​2.​2.​·​Library·​based·​run-​time·​bounds·​checking</​h4></​div></​div></​div><a·​id="idp63465528"·​class="indexterm"></​a><p>Compiler-​based·​mechanisms·​are·​completely·​useless·​for1331 ········​it·​can·​still·​be·​compromised.​</​p></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp63522360"></​a>3.​3.​2.​2.​·​Library·​based·​run-​time·​bounds·​checking</​h4></​div></​div></​div><a·​id="idp63522872"·​class="indexterm"></​a><p>Compiler-​based·​mechanisms·​are·​completely·​useless·​for
1332 ········​binary-​only·​software·​for·​which·​you·​cannot·​recompile.​··​For1332 ········​binary-​only·​software·​for·​which·​you·​cannot·​recompile.​··​For
1333 ········​these·​situations·​there·​are·​a·​number·​of·​libraries·​which1333 ········​these·​situations·​there·​are·​a·​number·​of·​libraries·​which
1334 ········​re-​implement·​the·​unsafe·​functions·​of·​the·​C-​library1334 ········​re-​implement·​the·​unsafe·​functions·​of·​the·​C-​library
1335 ········​(<code·​class="function">strc​py</​code>,​·​<code·​class="function">fsca​nf</​code>,​1335 ········​(<code·​class="function">strc​py</​code>,​·​<code·​class="function">fsca​nf</​code>,​
1336 ········​<code·​class="function">getw​d</​code>,​·​etc.​.​)​·​and·​ensure·​that·​these1336 ········​<code·​class="function">getw​d</​code>,​·​etc.​.​)​·​and·​ensure·​that·​these
1337 ········​functions·​can·​never·​write·​past·​the·​stack·​pointer.​</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem">libs​afe</​li><li·​class="listitem">libv​erify</​li><li·​class="listitem">libp​aranoia</​li></​ul></​div><p>Unfortunately·​these·​library-​based·​defenses·​have·​a·​number1337 ········​functions·​can·​never·​write·​past·​the·​stack·​pointer.​</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem">libs​afe</​li><li·​class="listitem">libv​erify</​li><li·​class="listitem">libp​aranoia</​li></​ul></​div><p>Unfortunately·​these·​library-​based·​defenses·​have·​a·​number
1338 ········​of·​shortcomings.​··​These·​libraries·​only·​protect·​against·​a·​very1338 ········​of·​shortcomings.​··​These·​libraries·​only·​protect·​against·​a·​very
1339 ········​small·​set·​of·​security·​related·​issues·​and·​they·​neglect·​to·​fix1339 ········​small·​set·​of·​security·​related·​issues·​and·​they·​neglect·​to·​fix
1340 ········​the·​actual·​problem.​··​These·​defenses·​may·​fail·​if·​the1340 ········​the·​actual·​problem.​··​These·​defenses·​may·​fail·​if·​the
1341 ········​application·​was·​compiled·​with·​-​fomit-​frame-​pointer.​··​Also,​·​the1341 ········​application·​was·​compiled·​with·​-​fomit-​frame-​pointer.​··​Also,​·​the
1342 ········​LD_PRELOAD·​and·​LD_LIBRARY_PATH·​environment·​variables·​can·​be1342 ········​LD_PRELOAD·​and·​LD_LIBRARY_PATH·​environment·​variables·​can·​be
1343 ········​overwritten/​unset·​by·​the·​user.​</​p></​div></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="secure-​setuid"></​a>3.​4.​·​SetUID·​issues</​h2></​div></​div></​div><a·​id="idp63479736"·​class="indexterm"></​a><p>There·​are·​at·​least·​6·​different·​IDs·​associated·​with·​any1343 ········​overwritten/​unset·​by·​the·​user.​</​p></​div></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="secure-​setuid"></​a>3.​4.​·​SetUID·​issues</​h2></​div></​div></​div><a·​id="idp63532984"·​class="indexterm"></​a><p>There·​are·​at·​least·​6·​different·​IDs·​associated·​with·​any
1344 ······​given·​process.​··​Because·​of·​this·​you·​have·​to·​be·​very·​careful·​with1344 ······​given·​process.​··​Because·​of·​this·​you·​have·​to·​be·​very·​careful·​with
1345 ······​the·​access·​that·​your·​process·​has·​at·​any·​given·​time.​··​In1345 ······​the·​access·​that·​your·​process·​has·​at·​any·​given·​time.​··​In
1346 ······​particular,​·​all·​seteuid·​applications·​should·​give·​up·​their1346 ······​particular,​·​all·​seteuid·​applications·​should·​give·​up·​their
1347 ······​privileges·​as·​soon·​as·​it·​is·​no·​longer·​required.​</​p><a·​id="idp63480632"·​class="indexterm"></​a><a·​id="idp63481784"·​class="indexterm"></​a><p>The·​real·​user·​ID·​can·​only·​be·​changed·​by·​a·​superuser1347 ······​privileges·​as·​soon·​as·​it·​is·​no·​longer·​required.​</​p><a·​id="idp63533880"·​class="indexterm"></​a><a·​id="idp63535032"·​class="indexterm"></​a><p>The·​real·​user·​ID·​can·​only·​be·​changed·​by·​a·​superuser
1348 ······​process.​··​The·​<span·​class="application">l​ogin</​span>·​program·​sets·​this1348 ······​process.​··​The·​<span·​class="application">l​ogin</​span>·​program·​sets·​this
1349 ······​when·​a·​user·​initially·​logs·​in·​and·​it·​is·​seldom·​changed.​</​p><p>The·​effective·​user·​ID·​is·​set·​by·​the1349 ······​when·​a·​user·​initially·​logs·​in·​and·​it·​is·​seldom·​changed.​</​p><p>The·​effective·​user·​ID·​is·​set·​by·​the
1350 ······​<code·​class="function">exec​()​</​code>·​functions·​if·​a·​program·​has·​its1350 ······​<code·​class="function">exec​()​</​code>·​functions·​if·​a·​program·​has·​its
1351 ······​seteuid·​bit·​set.​··​An·​application·​can·​call1351 ······​seteuid·​bit·​set.​··​An·​application·​can·​call
1352 ······​<code·​class="function">sete​uid()​</​code>·​at·​any·​time·​to·​set·​the·​effective1352 ······​<code·​class="function">sete​uid()​</​code>·​at·​any·​time·​to·​set·​the·​effective
1353 ······​user·​ID·​to·​either·​the·​real·​user·​ID·​or·​the·​saved·​set-​user-​ID.​1353 ······​user·​ID·​to·​either·​the·​real·​user·​ID·​or·​the·​saved·​set-​user-​ID.​
1354 ······​When·​the·​effective·​user·​ID·​is·​set·​by·​<code·​class="function">exec​()​</​code>1354 ······​When·​the·​effective·​user·​ID·​is·​set·​by·​<code·​class="function">exec​()​</​code>
1355 ······​functions,​·​the·​previous·​value·​is·​saved·​in·​the·​saved·​set-​user-​ID.​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="secure-​chroot"></​a>3.​5.​·​Limiting·​your·​program's·​environment</​h2></​div></​div></​div><a·​id="idp63486008"·​class="indexterm"></​a><p>The·​traditional·​method·​of·​restricting·​a·​process1355 ······​functions,​·​the·​previous·​value·​is·​saved·​in·​the·​saved·​set-​user-​ID.​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="secure-​chroot"></​a>3.​5.​·​Limiting·​your·​program's·​environment</​h2></​div></​div></​div><a·​id="idp63539256"·​class="indexterm"></​a><p>The·​traditional·​method·​of·​restricting·​a·​process
1356 ······​is·​with·​the·​<code·​class="function">chro​ot()​</​code>·​system·​call.​··​This1356 ······​is·​with·​the·​<code·​class="function">chro​ot()​</​code>·​system·​call.​··​This
1357 ······​system·​call·​changes·​the·​root·​directory·​from·​which·​all·​other1357 ······​system·​call·​changes·​the·​root·​directory·​from·​which·​all·​other
1358 ······​paths·​are·​referenced·​for·​a·​process·​and·​any·​child·​processes.​··​For1358 ······​paths·​are·​referenced·​for·​a·​process·​and·​any·​child·​processes.​··​For
1359 ······​this·​call·​to·​succeed·​the·​process·​must·​have·​execute·​(search)​1359 ······​this·​call·​to·​succeed·​the·​process·​must·​have·​execute·​(search)​
1360 ······​permission·​on·​the·​directory·​being·​referenced.​··​The·​new1360 ······​permission·​on·​the·​directory·​being·​referenced.​··​The·​new
1361 ······​environment·​does·​not·​actually·​take·​effect·​until·​you1361 ······​environment·​does·​not·​actually·​take·​effect·​until·​you
1362 ······​<code·​class="function">chdi​r()​</​code>·​into·​your·​new·​environment.​··​It1362 ······​<code·​class="function">chdi​r()​</​code>·​into·​your·​new·​environment.​··​It
Offset 1369, 15 lines modifiedOffset 1369, 15 lines modified
1369 ······​kern.​chroot_allow_open_dir​ectories·​<code·​class="command">sysct​l</​code>1369 ······​kern.​chroot_allow_open_dir​ectories·​<code·​class="command">sysct​l</​code>
1370 ······​variable.​··​When·​this·​value·​is·​set·​to·​0,​1370 ······​variable.​··​When·​this·​value·​is·​set·​to·​0,​
1371 ······​<code·​class="function">chro​ot()​</​code>·​will·​fail·​with·​EPERM·​if·​there·​are1371 ······​<code·​class="function">chro​ot()​</​code>·​will·​fail·​with·​EPERM·​if·​there·​are
1372 ······​any·​directories·​open.​··​If·​set·​to·​the·​default·​value·​of·​1,​·​then1372 ······​any·​directories·​open.​··​If·​set·​to·​the·​default·​value·​of·​1,​·​then
1373 ······​<code·​class="function">chro​ot()​</​code>·​will·​fail·​with·​EPERM·​if·​there·​are1373 ······​<code·​class="function">chro​ot()​</​code>·​will·​fail·​with·​EPERM·​if·​there·​are
1374 ······​any·​directories·​open·​and·​the·​process·​is·​already·​subject·​to·​a1374 ······​any·​directories·​open·​and·​the·​process·​is·​already·​subject·​to·​a
1375 ······​<code·​class="function">chro​ot()​</​code>·​call.​··​For·​any·​other·​value,​·​the1375 ······​<code·​class="function">chro​ot()​</​code>·​call.​··​For·​any·​other·​value,​·​the
1376 ······​check·​for·​open·​directories·​will·​be·​bypassed·​completely.​</​p><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp63489976"></​a>3.​5.​1.​·​FreeBSD's·​jail·​functionality</​h3></​div></​div></​div><a·​id="idp63490488"·​class="indexterm"></​a><p>The·​concept·​of·​a·​Jail·​extends·​upon·​the1376 ······​check·​for·​open·​directories·​will·​be·​bypassed·​completely.​</​p><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp63543224"></​a>3.​5.​1.​·​FreeBSD's·​jail·​functionality</​h3></​div></​div></​div><a·​id="idp63543736"·​class="indexterm"></​a><p>The·​concept·​of·​a·​Jail·​extends·​upon·​the
1377 ······​<code·​class="function">chro​ot()​</​code>·​by·​limiting·​the·​powers·​of·​the1377 ······​<code·​class="function">chro​ot()​</​code>·​by·​limiting·​the·​powers·​of·​the
1378 ······​superuser·​to·​create·​a·​true·​`virtual·​server'.​··​Once·​a·​prison·​is1378 ······​superuser·​to·​create·​a·​true·​`virtual·​server'.​··​Once·​a·​prison·​is
1379 ······​set·​up·​all·​network·​communication·​must·​take·​place·​through·​the1379 ······​set·​up·​all·​network·​communication·​must·​take·​place·​through·​the
1380 ······​specified·​IP·​address,​·​and·​the·​power·​of·​"root·​privilege"·​in·​this1380 ······​specified·​IP·​address,​·​and·​the·​power·​of·​"root·​privilege"·​in·​this
1381 ······​jail·​is·​severely·​constrained.​</​p><p>While·​in·​a·​prison,​·​any·​tests·​of·​superuser·​power·​within·​the1381 ······​jail·​is·​severely·​constrained.​</​p><p>While·​in·​a·​prison,​·​any·​tests·​of·​superuser·​power·​within·​the
1382 ······​kernel·​using·​the·​<code·​class="function">suse​r()​</​code>·​call·​will·​fail.​1382 ······​kernel·​using·​the·​<code·​class="function">suse​r()​</​code>·​call·​will·​fail.​
1383 ······​However,​·​some·​calls·​to·​<code·​class="function">suse​r()​</​code>·​have·​been1383 ······​However,​·​some·​calls·​to·​<code·​class="function">suse​r()​</​code>·​have·​been
Offset 1396, 75 lines modifiedOffset 1396, 75 lines modified
1396 ········​time.​</​li><li·​class="listitem">Bind​·​to·​privileged·​ports·​in·​the·​Internet1396 ········​time.​</​li><li·​class="listitem">Bind​·​to·​privileged·​ports·​in·​the·​Internet
1397 ········​domain·​(ports·​&lt;​·​1024)​</​li></​ul></​div><p><code·​class="function">Jail​</​code>·​is·​a·​very·​useful·​tool·​for1397 ········​domain·​(ports·​&lt;​·​1024)​</​li></​ul></​div><p><code·​class="function">Jail​</​code>·​is·​a·​very·​useful·​tool·​for
1398 ······​running·​applications·​in·​a·​secure·​environment·​but·​it·​does·​have1398 ······​running·​applications·​in·​a·​secure·​environment·​but·​it·​does·​have
1399 ······​some·​shortcomings.​··​Currently,​·​the·​IPC·​mechanisms·​have·​not·​been1399 ······​some·​shortcomings.​··​Currently,​·​the·​IPC·​mechanisms·​have·​not·​been
1400 ······​converted·​to·​the·​<code·​class="function">suse​r_xxx</​code>·​so·​applications1400 ······​converted·​to·​the·​<code·​class="function">suse​r_xxx</​code>·​so·​applications
1401 ······​such·​as·​MySQL·​cannot·​be·​run·​within·​a·​jail.​··​Superuser·​access1401 ······​such·​as·​MySQL·​cannot·​be·​run·​within·​a·​jail.​··​Superuser·​access
1402 ······​may·​have·​a·​very·​limited·​meaning·​within·​a·​jail,​·​but·​there·​is1402 ······​may·​have·​a·​very·​limited·​meaning·​within·​a·​jail,​·​but·​there·​is
1403 ······​no·​way·​to·​specify·​exactly·​what·​"very·​limited"·​means.​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp63503032"></​a>3.​5.​2.​·​<span·​class="trademark">POS​IX</​span>®.​1e·​Process·​Capabilities</​h3></​div></​div></​div><a·​id="idp63508024"·​class="indexterm"></​a><a·​id="idp63508536"·​class="indexterm"></​a><p><span·​class="trademark">POS​IX</​span>®·​has·​released·​a·​working·​draft·​that·​adds·​event1403 ······​no·​way·​to·​specify·​exactly·​what·​"very·​limited"·​means.​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp63556280"></​a>3.​5.​2.​·​<span·​class="trademark">POS​IX</​span>®.​1e·​Process·​Capabilities</​h3></​div></​div></​div><a·​id="idp63557176"·​class="indexterm"></​a><a·​id="idp63557688"·​class="indexterm"></​a><p><span·​class="trademark">POS​IX</​span>®·​has·​released·​a·​working·​draft·​that·​adds·​event
1404 ······​auditing,​·​access·​control·​lists,​·​fine·​grained·​privileges,​1404 ······​auditing,​·​access·​control·​lists,​·​fine·​grained·​privileges,​
1405 ······​information·​labeling,​·​and·​mandatory·​access·​control.​</​p><p>This·​is·​a·​work·​in·​progress·​and·​is·​the·​focus·​of·​the·​<a·​class="link"·​href="http:​/​/​www.​trustedbsd.​org/​"·​target="_top">Trusted​BSD</​a>·​project.​··​Some1405 ······​information·​labeling,​·​and·​mandatory·​access·​control.​</​p><p>This·​is·​a·​work·​in·​progress·​and·​is·​the·​focus·​of·​the·​<a·​class="link"·​href="http:​/​/​www.​trustedbsd.​org/​"·​target="_top">Trusted​BSD</​a>·​project.​··​Some
1406 ······​of·​the·​initial·​work·​has·​been·​committed·​to·​FreeBSD-​CURRENT1406 ······​of·​the·​initial·​work·​has·​been·​committed·​to·​FreeBSD-​CURRENT
1407 ······​(cap_set_proc(3)​)​.​</​p></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="secure-​trust"></​a>3.​6.​·​Trust</​h2></​div></​div></​div><p>An·​application·​should·​never·​assume·​that·​anything·​about·​the1407 ······​(cap_set_proc(3)​)​.​</​p></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="secure-​trust"></​a>3.​6.​·​Trust</​h2></​div></​div></​div><p>An·​application·​should·​never·​assume·​that·​anything·​about·​the
1408 ······​users·​environment·​is·​sane.​··​This·​includes·​(but·​is·​certainly·​not1408 ······​users·​environment·​is·​sane.​··​This·​includes·​(but·​is·​certainly·​not
1409 ······​limited·​to)​:​·​user·​input,​·​signals,​·​environment·​variables,​1409 ······​limited·​to)​:​·​user·​input,​·​signals,​·​environment·​variables,​
1410 ······​resources,​·​IPC,​·​mmaps,​·​the·​filesystem·​working·​directory,​·​file1410 ······​resources,​·​IPC,​·​mmaps,​·​the·​filesystem·​working·​directory,​·​file
1411 ······​descriptors,​·​the·​#·​of·​open·​files,​·​etc.​</​p><a·​id="idp63511992"·​class="indexterm"></​a><a·​id="idp63512504"·​class="indexterm"></​a><p>You·​should·​never·​assume·​that·​you·​can·​catch·​all·​forms·​of1411 ······​descriptors,​·​the·​#·​of·​open·​files,​·​etc.​</​p><a·​id="idp63577528"·​class="indexterm"></​a><a·​id="idp63578040"·​class="indexterm"></​a><p>You·​should·​never·​assume·​that·​you·​can·​catch·​all·​forms·​of
1412 ······​invalid·​input·​that·​a·​user·​might·​supply.​··​Instead,​·​your1412 ······​invalid·​input·​that·​a·​user·​might·​supply.​··​Instead,​·​your
1413 ······​application·​should·​use·​positive·​filtering·​to·​only·​allow·​a1413 ······​application·​should·​use·​positive·​filtering·​to·​only·​allow·​a
1414 ······​specific·​subset·​of·​inputs·​that·​you·​deem·​safe.​··​Improper·​data1414 ······​specific·​subset·​of·​inputs·​that·​you·​deem·​safe.​··​Improper·​data
1415 ······​validation·​has·​been·​the·​cause·​of·​many·​exploits,​·​especially·​with1415 ······​validation·​has·​been·​the·​cause·​of·​many·​exploits,​·​especially·​with
1416 ······​CGI·​scripts·​on·​the·​world·​wide·​web.​··​For·​filenames·​you·​need·​to·​be1416 ······​CGI·​scripts·​on·​the·​world·​wide·​web.​··​For·​filenames·​you·​need·​to·​be
1417 ······​extra·​careful·​about·​paths·​(".​.​/​",​·​"/​")​,​·​symbolic·​links,​·​and1417 ······​extra·​careful·​about·​paths·​(".​.​/​",​·​"/​")​,​·​symbolic·​links,​·​and
1418 ······​shell·​escape·​characters.​</​p><a·​id="idp63513400"·​class="indexterm"></​a><p>Perl·​has·​a·​really·​cool·​feature·​called·​"Taint"·​mode·​which1418 ······​shell·​escape·​characters.​</​p><a·​id="idp63578936"·​class="indexterm"></​a><p>Perl·​has·​a·​really·​cool·​feature·​called·​"Taint"·​mode·​which
1419 ······​can·​be·​used·​to·​prevent·​scripts·​from·​using·​data·​derived·​outside1419 ······​can·​be·​used·​to·​prevent·​scripts·​from·​using·​data·​derived·​outside
1420 ······​the·​program·​in·​an·​unsafe·​way.​··​This·​mode·​will·​check·​command·​line1420 ······​the·​program·​in·​an·​unsafe·​way.​··​This·​mode·​will·​check·​command·​line
1421 ······​arguments,​·​environment·​variables,​·​locale·​information,​·​the1421 ······​arguments,​·​environment·​variables,​·​locale·​information,​·​the
1422 ······​results·​of·​certain·​syscalls·​(<code·​class="function">read​dir()​</​code>,​1422 ······​results·​of·​certain·​syscalls·​(<code·​class="function">read​dir()​</​code>,​
1423 ······​<code·​class="function">read​link()​</​code>,​1423 ······​<code·​class="function">read​link()​</​code>,​
1424 ······​<code·​class="function">getp​wxxx()​</​code>,​·​and·​all·​file·​input.​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="secure-​race-​conditions"></​a>3.​7.​·​Race·​Conditions</​h2></​div></​div></​div><p>A·​race·​condition·​is·​anomalous·​behavior·​caused·​by·​the1424 ······​<code·​class="function">getp​wxxx()​</​code>,​·​and·​all·​file·​input.​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="secure-​race-​conditions"></​a>3.​7.​·​Race·​Conditions</​h2></​div></​div></​div><p>A·​race·​condition·​is·​anomalous·​behavior·​caused·​by·​the
1425 ······​unexpected·​dependence·​on·​the·​relative·​timing·​of·​events.​··​In1425 ······​unexpected·​dependence·​on·​the·​relative·​timing·​of·​events.​··​In
1426 ······​other·​words,​·​a·​programmer·​incorrectly·​assumed·​that·​a·​particular1426 ······​other·​words,​·​a·​programmer·​incorrectly·​assumed·​that·​a·​particular
1427 ······​event·​would·​always·​happen·​before·​another.​</​p><a·​id="idp63516728"·​class="indexterm"></​a><a·​id="idp63517624"·​class="indexterm"></​a><a·​id="idp63518520"·​class="indexterm"></​a><p>Some·​of·​the·​common·​causes·​of·​race·​conditions·​are·​signals,​1427 ······​event·​would·​always·​happen·​before·​another.​</​p><a·​id="idp63582264"·​class="indexterm"></​a><a·​id="idp63583160"·​class="indexterm"></​a><a·​id="idp63584056"·​class="indexterm"></​a><p>Some·​of·​the·​common·​causes·​of·​race·​conditions·​are·​signals,​
1428 ······​access·​checks,​·​and·​file·​opens.​··​Signals·​are·​asynchronous·​events1428 ······​access·​checks,​·​and·​file·​opens.​··​Signals·​are·​asynchronous·​events
1429 ······​by·​nature·​so·​special·​care·​must·​be·​taken·​in·​dealing·​with·​them.​1429 ······​by·​nature·​so·​special·​care·​must·​be·​taken·​in·​dealing·​with·​them.​
1430 ······​Checking·​access·​with·​<code·​class="function">acce​ss(2)​</​code>·​then1430 ······​Checking·​access·​with·​<code·​class="function">acce​ss(2)​</​code>·​then
1431 ······​<code·​class="function">open​(2)​</​code>·​is·​clearly·​non-​atomic.​··​Users·​can1431 ······​<code·​class="function">open​(2)​</​code>·​is·​clearly·​non-​atomic.​··​Users·​can
1432 ······​move·​files·​in·​between·​the·​two·​calls.​··​Instead,​·​privileged1432 ······​move·​files·​in·​between·​the·​two·​calls.​··​Instead,​·​privileged
1433 ······​applications·​should·​<code·​class="function">sete​uid()​</​code>·​and·​then·​call1433 ······​applications·​should·​<code·​class="function">sete​uid()​</​code>·​and·​then·​call
1434 ······​<code·​class="function">open​()​</​code>·​directly.​··​Along·​the·​same·​lines,​·​an1434 ······​<code·​class="function">open​()​</​code>·​directly.​··​Along·​the·​same·​lines,​·​an
1435 ······​application·​should·​always·​set·​a·​proper·​umask·​before1435 ······​application·​should·​always·​set·​a·​proper·​umask·​before
1436 ······​<code·​class="function">open​()​</​code>·​to·​obviate·​the·​need·​for·​spurious1436 ······​<code·​class="function">open​()​</​code>·​to·​obviate·​the·​need·​for·​spurious
1437 ······​<code·​class="function">chmo​d()​</​code>·​calls.​</​p></​div></​div><div·​class="chapter"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="l10n"></​a>章·​4.​·​Localization·​and·​Internationalization·​-​·​L10N·​and·​I18N</​h2></​div></​div></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="sect1"><a·​href="#l10n-​programming">4.​1.​·​Programming·​I18N·​Compliant·​Applications</​a></​span></​dt></​dl></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="l10n-​programming"></​a>4.​1.​·​Programming·​I18N·​Compliant·​Applications</​h2></​div></​div></​div><a·​id="idp63524408"·​class="indexterm"></​a><a·​id="idp63524920"·​class="indexterm"></​a><p>To·​make·​your·​application·​more·​useful·​for·​speakers·​of·​other1437 ······​<code·​class="function">chmo​d()​</​code>·​calls.​</​p></​div></​div><div·​class="chapter"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="l10n"></​a>章·​4.​·​Localization·​and·​Internationalization·​-​·​L10N·​and·​I18N</​h2></​div></​div></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="sect1"><a·​href="#l10n-​programming">4.​1.​·​Programming·​I18N·​Compliant·​Applications</​a></​span></​dt></​dl></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="l10n-​programming"></​a>4.​1.​·​Programming·​I18N·​Compliant·​Applications</​h2></​div></​div></​div><a·​id="idp63589944"·​class="indexterm"></​a><a·​id="idp63590456"·​class="indexterm"></​a><p>To·​make·​your·​application·​more·​useful·​for·​speakers·​of·​other
1438 »       ​languages,​·​we·​hope·​that·​you·​will·​program·​I18N·​compliant.​··​The·​GNU1438 »       ​languages,​·​we·​hope·​that·​you·​will·​program·​I18N·​compliant.​··​The·​GNU
1439 »       ​gcc·​compiler·​and·​GUI·​libraries·​like·​QT·​and·​GTK·​support·​I18N·​through1439 »       ​gcc·​compiler·​and·​GUI·​libraries·​like·​QT·​and·​GTK·​support·​I18N·​through
1440 »       ​special·​handling·​of·​strings.​··​Making·​a·​program·​I18N·​compliant·​is1440 »       ​special·​handling·​of·​strings.​··​Making·​a·​program·​I18N·​compliant·​is
1441 »       ​very·​easy.​··​It·​allows·​contributors·​to·​port·​your·​application·​to1441 »       ​very·​easy.​··​It·​allows·​contributors·​to·​port·​your·​application·​to
1442 »       ​other·​languages·​quickly.​··​Refer·​to·​the·​library·​specific·​I18N1442 »       ​other·​languages·​quickly.​··​Refer·​to·​the·​library·​specific·​I18N
1443 »       ​documentation·​for·​more·​details.​</​p><p>In·​contrast·​with·​common·​perception,​·​I18N·​compliant·​code·​is1443 »       ​documentation·​for·​more·​details.​</​p><p>In·​contrast·​with·​common·​perception,​·​I18N·​compliant·​code·​is
1444 »       ​easy·​to·​write.​··​Usually,​·​it·​only·​involves·​wrapping·​your·​strings1444 »       ​easy·​to·​write.​··​Usually,​·​it·​only·​involves·​wrapping·​your·​strings
1445 »       ​with·​library·​specific·​functions.​··​In·​addition,​·​please·​be·​sure·​to1445 »       ​with·​library·​specific·​functions.​··​In·​addition,​·​please·​be·​sure·​to
1446 »       ​allow·​for·​wide·​or·​multibyte·​character·​support.​</​p><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp63526200"></​a>4.​1.​1.​·​A·​Call·​to·​Unify·​the·​I18N·​Effort</​h3></​div></​div></​div><p>It·​has·​come·​to·​our·​attention·​that·​the·​individual·​I18N/​L10N1446 »       ​allow·​for·​wide·​or·​multibyte·​character·​support.​</​p><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp63591736"></​a>4.​1.​1.​·​A·​Call·​to·​Unify·​the·​I18N·​Effort</​h3></​div></​div></​div><p>It·​has·​come·​to·​our·​attention·​that·​the·​individual·​I18N/​L10N
1447 »       ​··​efforts·​for·​each·​country·​has·​been·​repeating·​each·​others'1447 »       ​··​efforts·​for·​each·​country·​has·​been·​repeating·​each·​others'
1448 »       ​··​efforts.​··​Many·​of·​us·​have·​been·​reinventing·​the·​wheel·​repeatedly1448 »       ​··​efforts.​··​Many·​of·​us·​have·​been·​reinventing·​the·​wheel·​repeatedly
1449 »       ​··​and·​inefficiently.​··​We·​hope·​that·​the·​various·​major·​groups·​in1449 »       ​··​and·​inefficiently.​··​We·​hope·​that·​the·​various·​major·​groups·​in
1450 »       ​··​I18N·​could·​congregate·​into·​a·​group·​effort·​similar·​to·​the·​Core1450 »       ​··​I18N·​could·​congregate·​into·​a·​group·​effort·​similar·​to·​the·​Core
1451 »       ​··​Team's·​responsibility.​</​p><p>Currently,​·​we·​hope·​that,​·​when·​you·​write·​or·​port·​I18N1451 »       ​··​Team's·​responsibility.​</​p><p>Currently,​·​we·​hope·​that,​·​when·​you·​write·​or·​port·​I18N
1452 »       ​··​programs,​·​you·​would·​send·​it·​out·​to·​each·​country's·​related1452 »       ​··​programs,​·​you·​would·​send·​it·​out·​to·​each·​country's·​related
1453 »       ​··​FreeBSD·​mailing·​list·​for·​testing.​··​In·​the·​future,​·​we·​hope·​to1453 »       ​··​FreeBSD·​mailing·​list·​for·​testing.​··​In·​the·​future,​·​we·​hope·​to
1454 »       ​··​create·​applications·​that·​work·​in·​all·​the·​languages1454 »       ​··​create·​applications·​that·​work·​in·​all·​the·​languages
1455 »       ​··​out-​of-​the-​box·​without·​dirty·​hacks.​</​p><p>The·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​i18n"·​target="_top">FreeBSD​·​internationalization·​郵遞論壇</​a>·​has·​been·​established.​··​If·​you·​are·​an·​I18N/​L10N1455 »       ​··​out-​of-​the-​box·​without·​dirty·​hacks.​</​p><p>The·​<a·​class="link"·​href="http:​/​/​lists.​FreeBSD.​org/​mailman/​listinfo/​freebsd-​i18n"·​target="_top">FreeBSD​·​internationalization·​郵遞論壇</​a>·​has·​been·​established.​··​If·​you·​are·​an·​I18N/​L10N
1456 »       ​··​developer,​·​please·​send·​your·​comments,​·​ideas,​·​questions,​·​and1456 »       ​··​developer,​·​please·​send·​your·​comments,​·​ideas,​·​questions,​·​and
1457 »       ​··​anything·​you·​deem·​related·​to·​it.​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp63528632"></​a>4.​1.​2.​·​Perl·​and·​Python</​h3></​div></​div></​div><a·​id="idp63529272"·​class="indexterm"></​a><a·​id="idp63530040"·​class="indexterm"></​a><p>Perl·​and·​Python·​have·​I18N·​and·​wide·​character·​handling1457 »       ​··​anything·​you·​deem·​related·​to·​it.​</​p></​div><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp63598264"></​a>4.​1.​2.​·​Perl·​and·​Python</​h3></​div></​div></​div><a·​id="idp63598904"·​class="indexterm"></​a><a·​id="idp63599672"·​class="indexterm"></​a><p>Perl·​and·​Python·​have·​I18N·​and·​wide·​character·​handling
1458 »       ​··​libraries.​··​Please·​use·​them·​for·​I18N·​compliance.​</​p><p>In·​older·​FreeBSD·​versions,​1458 »       ​··​libraries.​··​Please·​use·​them·​for·​I18N·​compliance.​</​p><p>In·​older·​FreeBSD·​versions,​
1459 »       ​··​Perl·​may·​give·​warnings·​about·​not·​having·​a·​wide·​character·​locale1459 »       ​··​Perl·​may·​give·​warnings·​about·​not·​having·​a·​wide·​character·​locale
1460 »       ​··​installed·​on·​your·​system.​··​You·​can·​set·​the1460 »       ​··​installed·​on·​your·​system.​··​You·​can·​set·​the
1461 »       ​··​environment·​variable·​<code·​class="envar">LD_PREL​OAD</​code>·​to1461 »       ​··​environment·​variable·​<code·​class="envar">LD_PREL​OAD</​code>·​to
1462 »       ​··​<code·​class="filename">/​usr/​lib/​libxpg4.​so</​code>·​in·​your·​shell.​</​p><p>In·​<code·​class="literal">sh</​code>-​based·​shells:​</​p><pre·​class="programlisting​"><code·​class="envar">LD_PREL​OAD=/​usr/​lib/​libxpg4.​so</​code></​pre><p>In·​<code·​class="literal">C</​code>-​based·​shells:​</​p><pre·​class="programlisting​"><code·​class="envar">setenv·​LD_PRELOAD·​/​usr/​lib/​libxpg4.​so</​code></​pre></​div></​div></​div><div·​class="chapter"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="policies"></​a>章·​5.​·​Source·​Tree·​Guidelines·​and·​Policies</​h2></​div><div><span·​class="authorgroup">C​ontributed·​by·​<span·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><span·​class="firstname">Pou​l-​Henning</​span>·​<span·​class="surname">Kamp<​/​span></​span>.​·​</​span></​div></​div></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="sect1"><a·​href="#policies-​maintainer">5.​1.​·​<code·​class="varname">MAINT​AINER</​code>·​on·​Makefiles</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#poli·​✂1462 »       ​··​<code·​class="filename">/​usr/​lib/​libxpg4.​so</​code>·​in·​your·​shell.​</​p><p>In·​<code·​class="literal">sh</​code>-​based·​shells:​</​p><pre·​class="programlisting​"><code·​class="envar">LD_PREL​OAD=/​usr/​lib/​libxpg4.​so</​code></​pre><p>In·​<code·​class="literal">C</​code>-​based·​shells:​</​p><pre·​class="programlisting​"><code·​class="envar">setenv·​LD_PRELOAD·​/​usr/​lib/​libxpg4.​so</​code></​pre></​div></​div></​div><div·​class="chapter"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="policies"></​a>章·​5.​·​Source·​Tree·​Guidelines·​and·​Policies</​h2></​div><div><span·​class="authorgroup">C​ontributed·​by·​<span·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><span·​class="firstname">Pou​l-​Henning</​span>·​<span·​class="surname">Kamp<​/​span></​span>.​·​</​span></​div></​div></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="sect1"><a·​href="#policies-​maintainer">5.​1.​·​<code·​class="varname">MAINT​AINER</​code>·​on·​Makefiles</​a></​span></​dt><dt><span·​class="sect1"><a·​href="#poli·​✂
1463 ····​the·​FreeBSD·​source·​tree.​</​p><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="policies-​maintainer"></​a>5.​1.​·​<code·​class="varname">MAINT​AINER</​code>·​on·​Makefiles</​h2></​div></​div></​div><a·​id="idp63551928"·​class="indexterm"></​a><p>If·​a·​particular·​portion·​of·​the·​FreeBSD·​distribution·​is·​being1463 ····​the·​FreeBSD·​source·​tree.​</​p><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="policies-​maintainer"></​a>5.​1.​·​<code·​class="varname">MAINT​AINER</​code>·​on·​Makefiles</​h2></​div></​div></​div><a·​id="idp63609272"·​class="indexterm"></​a><p>If·​a·​particular·​portion·​of·​the·​FreeBSD·​distribution·​is·​being
1464 ······​maintained·​by·​a·​person·​or·​group·​of·​persons,​·​they·​can·​communicate·​this1464 ······​maintained·​by·​a·​person·​or·​group·​of·​persons,​·​they·​can·​communicate·​this
1465 ······​fact·​to·​the·​world·​by·​adding·​a1465 ······​fact·​to·​the·​world·​by·​adding·​a
  
1466 ······​</​p><pre·​class="programlisting​">MAINTAINER=·​email-​addresses</​pre><p>1466 ······​</​p><pre·​class="programlisting​">MAINTAINER=·​email-​addresses</​pre><p>
  
1467 ······​line·​to·​the·​<code·​class="filename">Make​file</​code>s·​covering·​this·​portion·​of·​the1467 ······​line·​to·​the·​<code·​class="filename">Make​file</​code>s·​covering·​this·​portion·​of·​the
1468 ······​source·​tree.​</​p><p>The·​semantics·​of·​this·​are·​as·​follows:​</​p><p>The·​maintainer·​owns·​and·​is·​responsible·​for·​that·​code.​··​This·​means1468 ······​source·​tree.​</​p><p>The·​semantics·​of·​this·​are·​as·​follows:​</​p><p>The·​maintainer·​owns·​and·​is·​responsible·​for·​that·​code.​··​This·​means
Offset 1474, 15 lines modifiedOffset 1474, 15 lines modified
1474 ······​to·​the·​maintainer·​for·​review·​before·​being·​committed.​··​Only·​if·​the1474 ······​to·​the·​maintainer·​for·​review·​before·​being·​committed.​··​Only·​if·​the
1475 ······​maintainer·​does·​not·​respond·​for·​an·​unacceptable·​period·​of·​time,​·​to1475 ······​maintainer·​does·​not·​respond·​for·​an·​unacceptable·​period·​of·​time,​·​to
1476 ······​several·​emails,​·​will·​it·​be·​acceptable·​to·​commit·​changes·​without·​review1476 ······​several·​emails,​·​will·​it·​be·​acceptable·​to·​commit·​changes·​without·​review
1477 ······​by·​the·​maintainer.​··​However,​·​it·​is·​suggested·​that·​you·​try·​to·​have·​the1477 ······​by·​the·​maintainer.​··​However,​·​it·​is·​suggested·​that·​you·​try·​to·​have·​the
1478 ······​changes·​reviewed··​by·​someone·​else·​if·​at·​all·​possible.​</​p><p>It·​is·​of·​course·​not·​acceptable·​to·​add·​a·​person·​or·​group·​as1478 ······​changes·​reviewed··​by·​someone·​else·​if·​at·​all·​possible.​</​p><p>It·​is·​of·​course·​not·​acceptable·​to·​add·​a·​person·​or·​group·​as
1479 ······​maintainer·​unless·​they·​agree·​to·​assume·​this·​duty.​··​On·​the·​other·​hand·​it1479 ······​maintainer·​unless·​they·​agree·​to·​assume·​this·​duty.​··​On·​the·​other·​hand·​it
1480 ······​does·​not·​have·​to·​be·​a·​committer·​and·​it·​can·​easily·​be·​a·​group·​of1480 ······​does·​not·​have·​to·​be·​a·​committer·​and·​it·​can·​easily·​be·​a·​group·​of
1481 ······​people.​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="policies-​contributed"></​a>5.​2.​·​Contributed·​Software</​h2></​div><div><span·​class="authorgroup">C​ontributed·​by·​<span·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><span·​class="firstname">Pou​l-​Henning</​span>·​<span·​class="surname">Kamp<​/​span></​span>·​且·​<span·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><span·​class="firstname">Dav​id</​span>·​<span·​class="surname">O'Bri​en</​span></​span>.​·​</​span></​div></​div></​div><a·​id="idp63562808"·​class="indexterm"></​a><p>Some·​parts·​of·​the·​FreeBSD·​distribution·​consist·​of·​software·​that·​is1481 ······​people.​</​p></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="policies-​contributed"></​a>5.​2.​·​Contributed·​Software</​h2></​div><div><span·​class="authorgroup">C​ontributed·​by·​<span·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><span·​class="firstname">Pou​l-​Henning</​span>·​<span·​class="surname">Kamp<​/​span></​span>·​且·​<span·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><span·​class="firstname">Dav​id</​span>·​<span·​class="surname">O'Bri​en</​span></​span>.​·​</​span></​div></​div></​div><a·​id="idp63616056"·​class="indexterm"></​a><p>Some·​parts·​of·​the·​FreeBSD·​distribution·​consist·​of·​software·​that·​is
1482 ······​actively·​being·​maintained·​outside·​the·​FreeBSD·​project.​··​For·​historical1482 ······​actively·​being·​maintained·​outside·​the·​FreeBSD·​project.​··​For·​historical
1483 ······​reasons,​·​we·​call·​this·​<span·​class="emphasis"><em>​contributed</​em></​span>·​software.​··​Some1483 ······​reasons,​·​we·​call·​this·​<span·​class="emphasis"><em>​contributed</​em></​span>·​software.​··​Some
1484 ······​examples·​are·​<span·​class="application">s​endmail</​span>,​·​<span·​class="application">g​cc</​span>·​and·​<span·​class="application">p​atch</​span>.​</​p><p>Over·​the·​last·​couple·​of·​years,​·​various·​methods·​have·​been·​used·​in1484 ······​examples·​are·​<span·​class="application">s​endmail</​span>,​·​<span·​class="application">g​cc</​span>·​and·​<span·​class="application">p​atch</​span>.​</​p><p>Over·​the·​last·​couple·​of·​years,​·​various·​methods·​have·​been·​used·​in
1485 ······​dealing·​with·​this·​type·​of·​software·​and·​all·​have·​some·​number·​of1485 ······​dealing·​with·​this·​type·​of·​software·​and·​all·​have·​some·​number·​of
1486 ······​advantages·​and·​drawbacks.​··​No·​clear·​winner·​has·​emerged.​</​p><p>Since·​this·​is·​the·​case,​·​after·​some·​debate·​one·​of·​these·​methods·​has1486 ······​advantages·​and·​drawbacks.​··​No·​clear·​winner·​has·​emerged.​</​p><p>Since·​this·​is·​the·​case,​·​after·​some·​debate·​one·​of·​these·​methods·​has
1487 ······​been·​selected·​as·​the·​<span·​class="quote">“<span·​class="quote">officia​l</​span>”</​span>·​method·​and·​will·​be·​required1487 ······​been·​selected·​as·​the·​<span·​class="quote">“<span·​class="quote">officia​l</​span>”</​span>·​method·​and·​will·​be·​required
1488 ······​for·​future·​imports·​of·​software·​of·​this·​kind.​··​Furthermore,​·​it·​is1488 ······​for·​future·​imports·​of·​software·​of·​this·​kind.​··​Furthermore,​·​it·​is
Offset 1605, 16 lines modifiedOffset 1605, 16 lines modified
1605 »       ​··​code.​</​p></​li><li·​class="listitem"><p>O​bject·​files·​are·​named1605 »       ​··​code.​</​p></​li><li·​class="listitem"><p>O​bject·​files·​are·​named
1606 »       ​··​<code·​class="filename">arch​/​filename.​o.​uu&gt;​</​code>.​</​p></​li><li·​class="listitem"><p>K​ernel·​files:​</​p><div·​class="orderedlist"><​ol·​class="orderedlist"·​type="a"><li·​class="listitem"><p>S​hould·​always·​be·​referenced·​in1606 »       ​··​<code·​class="filename">arch​/​filename.​o.​uu&gt;​</​code>.​</​p></​li><li·​class="listitem"><p>K​ernel·​files:​</​p><div·​class="orderedlist"><​ol·​class="orderedlist"·​type="a"><li·​class="listitem"><p>S​hould·​always·​be·​referenced·​in
1607 ··············​<code·​class="filename">conf​/​files.​*</​code>·​(for·​build·​simplicity)​.​</​p></​li><li·​class="listitem"><p>S​hould·​always·​be·​in·​<code·​class="filename">LINT​</​code>,​·​but·​the1607 ··············​<code·​class="filename">conf​/​files.​*</​code>·​(for·​build·​simplicity)​.​</​p></​li><li·​class="listitem"><p>S​hould·​always·​be·​in·​<code·​class="filename">LINT​</​code>,​·​but·​the
1608 »       ​······​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​contributors/​staff-​core.​html"·​target="_top">Core·​team</​a>·​decides·​per·​case·​if·​it1608 »       ​······​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​contributors/​staff-​core.​html"·​target="_top">Core·​team</​a>·​decides·​per·​case·​if·​it
1609 »       ​······​should·​be·​commented·​out·​or·​not.​··​The1609 »       ​······​should·​be·​commented·​out·​or·​not.​··​The
1610 »       ​······​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​contributors/​staff-​core.​html"·​target="_top">Core·​team</​a>·​can,​·​of·​course,​·​change1610 »       ​······​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​contributors/​staff-​core.​html"·​target="_top">Core·​team</​a>·​can,​·​of·​course,​·​change
1611 »       ​······​their·​minds·​later·​on.​</​p></​li><li·​class="listitem"><p>T​he·​<em·​class="firstterm">Rel​ease·​Engineer</​em>1611 »       ​······​their·​minds·​later·​on.​</​p></​li><li·​class="listitem"><p>T​he·​<em·​class="firstterm">Rel​ease·​Engineer</​em>
1612 ··············​decides·​whether·​or·​not·​it·​goes·​into·​the·​release.​</​p></​li></​ol></​div></​li><li·​class="listitem"><p>U​ser-​land·​files:​</​p><div·​class="orderedlist"><​ol·​class="orderedlist"·​type="a"><li·​class="listitem"><a·​id="idp63606968"·​class="indexterm"></​a><p>The·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​contributors/​staff-​core.​html"·​target="_top">Core·​team</​a>·​decides·​if1612 ··············​decides·​whether·​or·​not·​it·​goes·​into·​the·​release.​</​p></​li></​ol></​div></​li><li·​class="listitem"><p>U​ser-​land·​files:​</​p><div·​class="orderedlist"><​ol·​class="orderedlist"·​type="a"><li·​class="listitem"><a·​id="idp63676600"·​class="indexterm"></​a><p>The·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​contributors/​staff-​core.​html"·​target="_top">Core·​team</​a>·​decides·​if
1613 ··············​the·​code·​should·​be·​part·​of·​<code·​class="command">make·​world</​code>.​</​p></​li><li·​class="listitem"><a·​id="idp63609144"·​class="indexterm"></​a><p>The·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​contributors/​staff-​who.​html"·​target="_top">Release​·​Engineer</​a>1613 ··············​the·​code·​should·​be·​part·​of·​<code·​class="command">make·​world</​code>.​</​p></​li><li·​class="listitem"><a·​id="idp63678776"·​class="indexterm"></​a><p>The·​<a·​class="link"·​href=".​.​/​.​.​/​.​.​/​.​.​/​doc/​zh_TW.​UTF-​8/​articles/​contributors/​staff-​who.​html"·​target="_top">Release​·​Engineer</​a>
1614 ··············​decides·​if·​it·​goes·​into·​the·​release.​</​p></​li></​ol></​div></​li></​ol></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="policies-​shlib"></​a>5.​4.​·​Shared·​Libraries</​h2></​div><div><span·​class="authorgroup">C​ontributed·​by·​<span·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><span·​class="firstname">Sat​oshi</​span>·​<span·​class="surname">Asami​</​span></​span>,​·​<span·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><span·​class="firstname">Pet​er</​span>·​<span·​class="surname">Wemm<​/​span></​span>·​且·​<span·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><span·​class="firstname">Dav​id</​span>·​<span·​class="surname">O'Bri​en</​span></​span>.​·​</​span></​div></​div></​div><p>If·​you·​are·​adding·​shared·​library·​support·​to·​a·​port·​or·​other·​piece·​of1614 ··············​decides·​if·​it·​goes·​into·​the·​release.​</​p></​li></​ol></​div></​li></​ol></​div></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="policies-​shlib"></​a>5.​4.​·​Shared·​Libraries</​h2></​div><div><span·​class="authorgroup">C​ontributed·​by·​<span·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><span·​class="firstname">Sat​oshi</​span>·​<span·​class="surname">Asami​</​span></​span>,​·​<span·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><span·​class="firstname">Pet​er</​span>·​<span·​class="surname">Wemm<​/​span></​span>·​且·​<span·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><span·​class="firstname">Dav​id</​span>·​<span·​class="surname">O'Bri​en</​span></​span>.​·​</​span></​div></​div></​div><p>If·​you·​are·​adding·​shared·​library·​support·​to·​a·​port·​or·​other·​piece·​of
1615 ······​software·​that·​does·​not·​have·​one,​·​the·​version·​numbers·​should·​follow·​these1615 ······​software·​that·​does·​not·​have·​one,​·​the·​version·​numbers·​should·​follow·​these
1616 ······​rules.​··​Generally,​·​the·​resulting·​numbers·​will·​have·​nothing·​to·​do·​with1616 ······​rules.​··​Generally,​·​the·​resulting·​numbers·​will·​have·​nothing·​to·​do·​with
1617 ······​the·​release·​version·​of·​the·​software.​</​p><p>The·​three·​principles·​of·​shared·​library·​building·​are:​</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>S​tart·​from·​<code·​class="literal">1.​0</​code></​p></​li><li·​class="listitem"><p>I​f·​there·​is·​a·​change·​that·​is·​backwards·​compatible,​·​bump·​minor1617 ······​the·​release·​version·​of·​the·​software.​</​p><p>The·​three·​principles·​of·​shared·​library·​building·​are:​</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>S​tart·​from·​<code·​class="literal">1.​0</​code></​p></​li><li·​class="listitem"><p>I​f·​there·​is·​a·​change·​that·​is·​backwards·​compatible,​·​bump·​minor
1618 »       ​··​number·​(note·​that·​ELF·​systems·​ignore·​the·​minor·​number)​</​p></​li><li·​class="listitem"><p>I​f·​there·​is·​an·​incompatible·​change,​·​bump·​major·​number</​p></​li></​ul></​div><p>For·​instance,​·​added·​functions·​and·​bugfixes·​result·​in·​the·​minor1618 »       ​··​number·​(note·​that·​ELF·​systems·​ignore·​the·​minor·​number)​</​p></​li><li·​class="listitem"><p>I​f·​there·​is·​an·​incompatible·​change,​·​bump·​major·​number</​p></​li></​ul></​div><p>For·​instance,​·​added·​functions·​and·​bugfixes·​result·​in·​the·​minor
1619 ······​version·​number·​being·​bumped,​·​while·​deleted·​functions,​·​changed·​function1619 ······​version·​number·​being·​bumped,​·​while·​deleted·​functions,​·​changed·​function
1620 ······​call·​syntax,​·​etc.​·​will·​force·​the·​major·​version·​number·​to·​change.​</​p><p>Stick·​to·​version·​numbers·​of·​the·​form·​major.​minor1620 ······​call·​syntax,​·​etc.​·​will·​force·​the·​major·​version·​number·​to·​change.​</​p><p>Stick·​to·​version·​numbers·​of·​the·​form·​major.​minor
Offset 2699, 15 lines modifiedOffset 2699, 15 lines modified
2699 ······​release·​the·​system·​resources·​they·​are·​taking·​up.​</​p><p>That·​is·​why·​our·​flowchart·​now·​contains·​a·​<span·​class="emphasis"><em>​process2699 ······​release·​the·​system·​resources·​they·​are·​taking·​up.​</​p><p>That·​is·​why·​our·​flowchart·​now·​contains·​a·​<span·​class="emphasis"><em>​process
2700 ······​signals</​em></​span>·​box,​·​which·​is·​not·​connected·​to·​any·​other·​box.​2700 ······​signals</​em></​span>·​box,​·​which·​is·​not·​connected·​to·​any·​other·​box.​
2701 ······​By·​the·​way,​·​many·​servers·​also·​process·​<span·​class="symbol">SIGHUP​</​span>,​2701 ······​By·​the·​way,​·​many·​servers·​also·​process·​<span·​class="symbol">SIGHUP​</​span>,​
2702 ······​and·​typically·​interpret·​as·​the·​signal·​from·​the·​superuser·​that2702 ······​and·​typically·​interpret·​as·​the·​signal·​from·​the·​superuser·​that
2703 ······​they·​should·​reread·​their·​configuration·​files.​·​This·​allows·​us·​to2703 ······​they·​should·​reread·​their·​configuration·​files.​·​This·​allows·​us·​to
2704 ······​change·​settings·​without·​having·​to·​kill·​and·​restart·​these2704 ······​change·​settings·​without·​having·​to·​kill·​and·​restart·​these
2705 ······​servers.​</​p></​div></​div><div·​class="chapter"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="ipv6"></​a>章·​8.​·​IPv6·​Internals</​h2></​div></​div></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="sect1"><a·​href="#ipv6-​implementation">8.​1.​·​IPv6/​IPsec·​Implementation</​a></​span></​dt></​dl></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="ipv6-​implementation"></​a>8.​1.​·​IPv6/​IPsec·​Implementation</​h2></​div><div><span·​class="authorgroup">C​ontributed·​by·​<span·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><span·​class="firstname">Yos​hinobu</​span>·​<span·​class="surname">Inoue​</​span></​span>.​·​</​span></​div></​div></​div><p>This·​section·​should·​explain·​IPv6·​and·​IPsec·​related·​implementation2705 ······​servers.​</​p></​div></​div><div·​class="chapter"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="ipv6"></​a>章·​8.​·​IPv6·​Internals</​h2></​div></​div></​div><div·​class="toc"><div·​class="toc-​title">內容目錄</​div><dl·​class="toc"><dt><span​·​class="sect1"><a·​href="#ipv6-​implementation">8.​1.​·​IPv6/​IPsec·​Implementation</​a></​span></​dt></​dl></​div><div·​class="sect1"><div·​xmlns=""·​class="titlepage"><di​v><div><h2·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"·​style="clear:​·​both"><a·​id="ipv6-​implementation"></​a>8.​1.​·​IPv6/​IPsec·​Implementation</​h2></​div><div><span·​class="authorgroup">C​ontributed·​by·​<span·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="author"><span·​class="firstname">Yos​hinobu</​span>·​<span·​class="surname">Inoue​</​span></​span>.​·​</​span></​div></​div></​div><p>This·​section·​should·​explain·​IPv6·​and·​IPsec·​related·​implementation
2706 ····​internals.​··​These·​functionalities·​are·​derived·​from·​<a·​class="link"·​href="http:​/​/​www.​kame.​net/​"·​target="_top">KAME·​project</​a></​p><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="ipv6details"></​a>8.​1.​1.​·​IPv6</​h3></​div></​div></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64043320"></​a>8.​1.​1.​1.​·​Conformance</​h4></​div></​div></​div><p>The·​IPv6·​related·​functions·​conforms,​·​or·​tries·​to·​conform·​to2706 ····​internals.​··​These·​functionalities·​are·​derived·​from·​<a·​class="link"·​href="http:​/​/​www.​kame.​net/​"·​target="_top">KAME·​project</​a></​p><div·​class="sect2"><div·​xmlns=""·​class="titlepage"><di​v><div><h3·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="ipv6details"></​a>8.​1.​1.​·​IPv6</​h3></​div></​div></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64100664"></​a>8.​1.​1.​1.​·​Conformance</​h4></​div></​div></​div><p>The·​IPv6·​related·​functions·​conforms,​·​or·​tries·​to·​conform·​to
2707 »       ​the·​latest·​set·​of·​IPv6·​specifications.​··​For·​future·​reference·​we·​list2707 »       ​the·​latest·​set·​of·​IPv6·​specifications.​··​For·​future·​reference·​we·​list
2708 »       ​some·​of·​the·​relevant·​documents·​below·​(<span·​class="emphasis"><em>​NOTE</​em></​span>:​·​this2708 »       ​some·​of·​the·​relevant·​documents·​below·​(<span·​class="emphasis"><em>​NOTE</​em></​span>:​·​this
2709 »       ​is·​not·​a·​complete·​list·​-​·​this·​is·​too·​hard·​to·​maintain.​.​.​)​.​</​p><p>For·​details·​please·​refer·​to·​specific·​chapter·​in·​the·​document,​2709 »       ​is·​not·​a·​complete·​list·​-​·​this·​is·​too·​hard·​to·​maintain.​.​.​)​.​</​p><p>For·​details·​please·​refer·​to·​specific·​chapter·​in·​the·​document,​
2710 »       ​RFCs,​·​manual·​pages,​·​or·​comments·​in·​the·​source·​code.​</​p><p>Conformance·​tests·​have·​been·​performed·​on·​the·​KAME·​STABLE·​kit2710 »       ​RFCs,​·​manual·​pages,​·​or·​comments·​in·​the·​source·​code.​</​p><p>Conformance·​tests·​have·​been·​performed·​on·​the·​KAME·​STABLE·​kit
2711 ········​at·​TAHI·​project.​··​Results·​can·​be·​viewed·​at2711 ········​at·​TAHI·​project.​··​Results·​can·​be·​viewed·​at
2712 »       ​<code·​class="uri"><a·​class="uri"·​href="http:​/​/​www.​tahi.​org/​report/​KAME/​"·​target="_top">http:​/​/​www.​tahi.​org/​report/​KAME/​</​a></​code>.​2712 »       ​<code·​class="uri"><a·​class="uri"·​href="http:​/​/​www.​tahi.​org/​report/​KAME/​"·​target="_top">http:​/​/​www.​tahi.​org/​report/​KAME/​</​a></​code>.​
2713 »       ​We·​also·​attended·​Univ.​·​of·​New·​Hampshire·​IOL·​tests2713 »       ​We·​also·​attended·​Univ.​·​of·​New·​Hampshire·​IOL·​tests
Offset 2823, 15 lines modifiedOffset 2823, 15 lines modified
2823 »       ​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=getaddrinfo​&amp;​sektion=3&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>getaddrinfo</​span>(3)​</​span></​a>,​·​and·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=getnameinfo​&amp;​sektion=3&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>getnameinfo</​span>(3)​</​span></​a>·​with·​NI_WITHSCOPEID.​2823 »       ​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=getaddrinfo​&amp;​sektion=3&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>getaddrinfo</​span>(3)​</​span></​a>,​·​and·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=getnameinfo​&amp;​sektion=3&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>getnameinfo</​span>(3)​</​span></​a>·​with·​NI_WITHSCOPEID.​
2824 »       ​The·​implementation·​currently·​assumes·​1-​to-​1·​relationship·​between·​a2824 »       ​The·​implementation·​currently·​assumes·​1-​to-​1·​relationship·​between·​a
2825 »       ​link·​and·​an·​interface,​·​which·​is·​stronger·​than·​what·​specs·​say.​</​p></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="ipv6-​pnp"></​a>8.​1.​1.​4.​·​Plug·​and·​Play</​h4></​div></​div></​div><p>Most·​of·​the·​IPv6·​stateless·​address·​autoconfiguration·​is·​implemented2825 »       ​link·​and·​an·​interface,​·​which·​is·​stronger·​than·​what·​specs·​say.​</​p></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="ipv6-​pnp"></​a>8.​1.​1.​4.​·​Plug·​and·​Play</​h4></​div></​div></​div><p>Most·​of·​the·​IPv6·​stateless·​address·​autoconfiguration·​is·​implemented
2826 »       ​in·​the·​kernel.​··​Neighbor·​Discovery·​functions·​are·​implemented·​in·​the2826 »       ​in·​the·​kernel.​··​Neighbor·​Discovery·​functions·​are·​implemented·​in·​the
2827 »       ​kernel·​as·​a·​whole.​··​Router·​Advertisement·​(RA)​·​input·​for·​hosts·​is2827 »       ​kernel·​as·​a·​whole.​··​Router·​Advertisement·​(RA)​·​input·​for·​hosts·​is
2828 »       ​implemented·​in·​the·​kernel.​··​Router·​Solicitation·​(RS)​·​output·​for2828 »       ​implemented·​in·​the·​kernel.​··​Router·​Solicitation·​(RS)​·​output·​for
2829 »       ​endhosts,​·​RS·​input·​for·​routers,​·​and·​RA·​output·​for·​routers·​are2829 »       ​endhosts,​·​RS·​input·​for·​routers,​·​and·​RA·​output·​for·​routers·​are
2830 »       ​implemented·​in·​the·​userland.​</​p><div·​class="sect4"><div·​xmlns=""·​class="titlepage"><di​v><div><h5·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64167224"></​a>8.​1.​1.​4.​1.​·​Assignment·​of·​link-​local,​·​and·​special·​addresses</​h5></​div></​div></​div><p>IPv6·​link-​local·​address·​is·​generated·​from·​IEEE802·​address2830 »       ​implemented·​in·​the·​userland.​</​p><div·​class="sect4"><div·​xmlns=""·​class="titlepage"><di​v><div><h5·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64236856"></​a>8.​1.​1.​4.​1.​·​Assignment·​of·​link-​local,​·​and·​special·​addresses</​h5></​div></​div></​div><p>IPv6·​link-​local·​address·​is·​generated·​from·​IEEE802·​address
2831 »       ​··​(Ethernet·​MAC·​address)​.​··​Each·​of·​interface·​is·​assigned·​an·​IPv62831 »       ​··​(Ethernet·​MAC·​address)​.​··​Each·​of·​interface·​is·​assigned·​an·​IPv6
2832 »       ​··​link-​local·​address·​automatically,​·​when·​the·​interface·​becomes·​up2832 »       ​··​link-​local·​address·​automatically,​·​when·​the·​interface·​becomes·​up
2833 »       ​··​(IFF_UP)​.​··​Also,​·​direct·​route·​for·​the·​link-​local·​address·​is·​added2833 »       ​··​(IFF_UP)​.​··​Also,​·​direct·​route·​for·​the·​link-​local·​address·​is·​added
2834 »       ​··​to·​routing·​table.​</​p><p>Here·​is·​an·​output·​of·​netstat·​command:​</​p><pre·​class="screen">Intern​et6:​2834 »       ​··​to·​routing·​table.​</​p><p>Here·​is·​an·​output·​of·​netstat·​command:​</​p><pre·​class="screen">Intern​et6:​
2835 Destination···················​Gateway···················​Flags······​Netif·​Expire2835 Destination···················​Gateway···················​Flags······​Netif·​Expire
2836 fe80:​1:​:​%ed0/​64···············​link#1····················​UC··········​ed02836 fe80:​1:​:​%ed0/​64···············​link#1····················​UC··········​ed0
2837 fe80:​2:​:​%ep0/​64···············​link#2····················​UC··········​ep0</​pre><p>Interfaces·​that·​has·​no·​IEEE802·​address·​(pseudo·​interfaces2837 fe80:​2:​:​%ep0/​64···············​link#2····················​UC··········​ep0</​pre><p>Interfaces·​that·​has·​no·​IEEE802·​address·​(pseudo·​interfaces
Offset 2845, 15 lines modifiedOffset 2845, 15 lines modified
2845 »       ​··​lack·​of·​multicast·​support)​,​·​link-​local·​address·​will·​not·​be2845 »       ​··​lack·​of·​multicast·​support)​,​·​link-​local·​address·​will·​not·​be
2846 »       ​··​assigned·​to·​that·​interface.​··​See·​section·​2·​for·​details.​</​p><p>Each·​interface·​joins·​the·​solicited·​multicast·​address·​and·​the2846 »       ​··​assigned·​to·​that·​interface.​··​See·​section·​2·​for·​details.​</​p><p>Each·​interface·​joins·​the·​solicited·​multicast·​address·​and·​the
2847 »       ​··​link-​local·​all-​nodes·​multicast·​addresses·​(e.​g.​·​fe80:​:​1:​ff01:​63172847 »       ​··​link-​local·​all-​nodes·​multicast·​addresses·​(e.​g.​·​fe80:​:​1:​ff01:​6317
2848 »       ​··​and·​ff02:​:​1,​·​respectively,​·​on·​the·​link·​the·​interface·​is·​attached)​.​2848 »       ​··​and·​ff02:​:​1,​·​respectively,​·​on·​the·​link·​the·​interface·​is·​attached)​.​
2849 »       ​··​In·​addition·​to·​a·​link-​local·​address,​·​the·​loopback·​address·​(:​:​1)​2849 »       ​··​In·​addition·​to·​a·​link-​local·​address,​·​the·​loopback·​address·​(:​:​1)​
2850 »       ​··​will·​be·​assigned·​to·​the·​loopback·​interface.​··​Also,​·​:​:​1/​128·​and2850 »       ​··​will·​be·​assigned·​to·​the·​loopback·​interface.​··​Also,​·​:​:​1/​128·​and
2851 »       ​··​ff01:​:​/​32·​are·​automatically·​added·​to·​routing·​table,​·​and·​loopback2851 »       ​··​ff01:​:​/​32·​are·​automatically·​added·​to·​routing·​table,​·​and·​loopback
2852 »       ​··​interface·​joins·​node-​local·​multicast·​group·​ff01:​:​1.​</​p></​div><div·​class="sect4"><div·​xmlns=""·​class="titlepage"><di​v><div><h5·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64170296"></​a>8.​1.​1.​4.​2.​·​Stateless·​address·​autoconfiguration·​on·​hosts</​h5></​div></​div></​div><p>In·​IPv6·​specification,​·​nodes·​are·​separated·​into·​two·​categories:​2852 »       ​··​interface·​joins·​node-​local·​multicast·​group·​ff01:​:​1.​</​p></​div><div·​class="sect4"><div·​xmlns=""·​class="titlepage"><di​v><div><h5·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64239928"></​a>8.​1.​1.​4.​2.​·​Stateless·​address·​autoconfiguration·​on·​hosts</​h5></​div></​div></​div><p>In·​IPv6·​specification,​·​nodes·​are·​separated·​into·​two·​categories:​
2853 »       ​··​<span·​class="emphasis"><em>​routers</​em></​span>·​and·​<span·​class="emphasis"><em>​hosts</​em></​span>.​··​Routers2853 »       ​··​<span·​class="emphasis"><em>​routers</​em></​span>·​and·​<span·​class="emphasis"><em>​hosts</​em></​span>.​··​Routers
2854 »       ​··​forward·​packets·​addressed·​to·​others,​·​hosts·​does·​not·​forward·​the2854 »       ​··​forward·​packets·​addressed·​to·​others,​·​hosts·​does·​not·​forward·​the
2855 »       ​··​packets.​··​net.​inet6.​ip6.​forwarding·​defines·​whether·​this·​node·​is2855 »       ​··​packets.​··​net.​inet6.​ip6.​forwarding·​defines·​whether·​this·​node·​is
2856 »       ​··​router·​or·​host·​(router·​if·​it·​is·​1,​·​host·​if·​it·​is·​0)​.​</​p><p>When·​a·​host·​hears·​Router·​Advertisement·​from·​the·​router,​·​a·​host2856 »       ​··​router·​or·​host·​(router·​if·​it·​is·​1,​·​host·​if·​it·​is·​0)​.​</​p><p>When·​a·​host·​hears·​Router·​Advertisement·​from·​the·​router,​·​a·​host
2857 »       ​··​may·​autoconfigure·​itself·​by·​stateless·​address·​autoconfiguration.​2857 »       ​··​may·​autoconfigure·​itself·​by·​stateless·​address·​autoconfiguration.​
2858 »       ​··​This·​behavior·​can·​be·​controlled·​by·​net.​inet6.​ip6.​accept_rtadv·​(host2858 »       ​··​This·​behavior·​can·​be·​controlled·​by·​net.​inet6.​ip6.​accept_rtadv·​(host
2859 »       ​··​autoconfigures·​itself·​if·​it·​is·​set·​to·​1)​.​··​By·​autoconfiguration,​2859 »       ​··​autoconfigures·​itself·​if·​it·​is·​set·​to·​1)​.​··​By·​autoconfiguration,​
Offset 2983, 15 lines modifiedOffset 2983, 15 lines modified
2983 »       ​····​places.​··​We·​need·​to·​convert·​them·​into·​larger·​integral·​type.​2983 »       ​····​places.​··​We·​need·​to·​convert·​them·​into·​larger·​integral·​type.​
2984 »       ​····​It·​needs·​a·​great·​care,​·​as·​we·​may·​experience·​overflow·​during2984 »       ​····​It·​needs·​a·​great·​care,​·​as·​we·​may·​experience·​overflow·​during
2985 »       ​····​packet·​length·​computation.​</​p></​li><li·​class="listitem"><p>W​e·​mistakingly·​check·​for·​ip6_plen·​field·​of·​IPv6·​header2985 »       ​····​packet·​length·​computation.​</​p></​li><li·​class="listitem"><p>W​e·​mistakingly·​check·​for·​ip6_plen·​field·​of·​IPv6·​header
2986 »       ​····​for·​packet·​payload·​length·​in·​various·​places.​··​We·​should·​be2986 »       ​····​for·​packet·​payload·​length·​in·​various·​places.​··​We·​should·​be
2987 »       ​····​checking·​mbuf·​pkthdr.​len·​instead.​··​ip6_input()​·​will·​perform2987 »       ​····​checking·​mbuf·​pkthdr.​len·​instead.​··​ip6_input()​·​will·​perform
2988 »       ​····​sanity·​check·​on·​jumbo·​payload·​option·​on·​input,​·​and·​we·​can2988 »       ​····​sanity·​check·​on·​jumbo·​payload·​option·​on·​input,​·​and·​we·​can
2989 »       ​····​safely·​use·​mbuf·​pkthdr.​len·​afterwards.​</​p></​li><li·​class="listitem"><p>T​CP·​code·​needs·​a·​careful·​update·​in·​bunch·​of·​places,​·​of2989 »       ​····​safely·​use·​mbuf·​pkthdr.​len·​afterwards.​</​p></​li><li·​class="listitem"><p>T​CP·​code·​needs·​a·​careful·​update·​in·​bunch·​of·​places,​·​of
2990 »       ​····​course.​</​p></​li></​ul></​div></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64242872"></​a>8.​1.​1.​8.​·​Loop·​prevention·​in·​header·​processing</​h4></​div></​div></​div><p>IPv6·​specification·​allows·​arbitrary·​number·​of·​extension·​headers2990 »       ​····​course.​</​p></​li></​ul></​div></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64300216"></​a>8.​1.​1.​8.​·​Loop·​prevention·​in·​header·​processing</​h4></​div></​div></​div><p>IPv6·​specification·​allows·​arbitrary·​number·​of·​extension·​headers
2991 »       ​to·​be·​placed·​onto·​packets.​··​If·​we·​implement·​IPv6·​packet·​processing2991 »       ​to·​be·​placed·​onto·​packets.​··​If·​we·​implement·​IPv6·​packet·​processing
2992 »       ​code·​in·​the·​way·​BSD·​IPv4·​code·​is·​implemented,​·​kernel·​stack·​may2992 »       ​code·​in·​the·​way·​BSD·​IPv4·​code·​is·​implemented,​·​kernel·​stack·​may
2993 »       ​overflow·​due·​to·​long·​function·​call·​chain.​··​sys/​netinet6·​code2993 »       ​overflow·​due·​to·​long·​function·​call·​chain.​··​sys/​netinet6·​code
2994 »       ​is·​carefully·​designed·​to·​avoid·​kernel·​stack·​overflow.​··​Because·​of2994 »       ​is·​carefully·​designed·​to·​avoid·​kernel·​stack·​overflow.​··​Because·​of
2995 »       ​this,​·​sys/​netinet6·​code·​defines·​its·​own·​protocol·​switch2995 »       ​this,​·​sys/​netinet6·​code·​defines·​its·​own·​protocol·​switch
2996 »       ​structure,​·​as·​"struct·​ip6protosw"·​(see2996 »       ​structure,​·​as·​"struct·​ip6protosw"·​(see
2997 »       ​<code·​class="filename">neti​net6/​ip6protosw.​h</​code>)​.​··​There·​is·​no·​such2997 »       ​<code·​class="filename">neti​net6/​ip6protosw.​h</​code>)​.​··​There·​is·​no·​such
Offset 3001, 20 lines modifiedOffset 3001, 20 lines modified
3001 »       ​packet·​with·​massive·​number·​of·​IPsec·​headers,​·​kernel·​stack·​may·​blow3001 »       ​packet·​with·​massive·​number·​of·​IPsec·​headers,​·​kernel·​stack·​may·​blow
3002 »       ​up.​··​IPsec-​over-​IPv6·​is·​okay.​··​(Off-​course,​·​for·​those·​all·​IPsec3002 »       ​up.​··​IPsec-​over-​IPv6·​is·​okay.​··​(Off-​course,​·​for·​those·​all·​IPsec
3003 »       ​headers·​to·​be·​processed,​·​each·​such·​IPsec·​header·​must·​pass·​each3003 »       ​headers·​to·​be·​processed,​·​each·​such·​IPsec·​header·​must·​pass·​each
3004 »       ​IPsec·​check.​·​So·​an·​anonymous·​attacker·​will·​not·​be·​able·​to·​do·​such·​an3004 »       ​IPsec·​check.​·​So·​an·​anonymous·​attacker·​will·​not·​be·​able·​to·​do·​such·​an
3005 »       ​attack.​)​</​p></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="icmpv6"></​a>8.​1.​1.​9.​·​ICMPv6</​h4></​div></​div></​div><p>After·​RFC2463·​was·​published,​·​IETF·​ipngwg·​has·​decided·​to3005 »       ​attack.​)​</​p></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="icmpv6"></​a>8.​1.​1.​9.​·​ICMPv6</​h4></​div></​div></​div><p>After·​RFC2463·​was·​published,​·​IETF·​ipngwg·​has·​decided·​to
3006 »       ​disallow·​ICMPv6·​error·​packet·​against·​ICMPv6·​redirect,​·​to·​prevent3006 »       ​disallow·​ICMPv6·​error·​packet·​against·​ICMPv6·​redirect,​·​to·​prevent
3007 »       ​ICMPv6·​storm·​on·​a·​network·​medium.​··​This·​is·​already·​implemented3007 »       ​ICMPv6·​storm·​on·​a·​network·​medium.​··​This·​is·​already·​implemented
3008 »       ​into·​the·​kernel.​</​p></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64245688"></​a>8.​1.​1.​10.​·​Applications</​h4></​div></​div></​div><p>For·​userland·​programming,​·​we·​support·​IPv6·​socket·​API·​as3008 »       ​into·​the·​kernel.​</​p></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64303032"></​a>8.​1.​1.​10.​·​Applications</​h4></​div></​div></​div><p>For·​userland·​programming,​·​we·​support·​IPv6·​socket·​API·​as
3009 »       ​specified·​in·​RFC2553,​·​RFC2292·​and·​upcoming·​Internet·​drafts.​</​p><p>TCP/​UDP·​over·​IPv6·​is·​available·​and·​quite·​stable.​··​You·​can3009 »       ​specified·​in·​RFC2553,​·​RFC2292·​and·​upcoming·​Internet·​drafts.​</​p><p>TCP/​UDP·​over·​IPv6·​is·​available·​and·​quite·​stable.​··​You·​can
3010 »       ​enjoy·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=telnet&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>telnet</​span>(1)​</​span></​a>,​·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=ftp&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>ftp</​span>(1)​</​span></​a>,​·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=rlogin&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>rlogin</​span>(1)​</​span></​a>,​·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=rsh&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>rsh</​span>(1)​</​span></​a>,​3010 »       ​enjoy·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=telnet&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>telnet</​span>(1)​</​span></​a>,​·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=ftp&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>ftp</​span>(1)​</​span></​a>,​·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=rlogin&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>rlogin</​span>(1)​</​span></​a>,​·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=rsh&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>rsh</​span>(1)​</​span></​a>,​
3011 »       ​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=ssh&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>ssh</​span>(1)​</​span></​a>,​·​etc.​··​These·​applications·​are·​protocol·​independent.​3011 »       ​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=ssh&amp;​sektion=1&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>ssh</​span>(1)​</​span></​a>,​·​etc.​··​These·​applications·​are·​protocol·​independent.​
3012 »       ​That·​is,​·​they·​automatically·​chooses·​IPv4·​or·​IPv6·​according·​to·​DNS.​3012 »       ​That·​is,​·​they·​automatically·​chooses·​IPv4·​or·​IPv6·​according·​to·​DNS.​
3013 »       ​</​p></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64251320"></​a>8.​1.​1.​11.​·​Kernel·​Internals</​h4></​div></​div></​div><p>While·​ip_forward()​·​calls·​ip_output()​,​·​ip6_forward()​·​directly3013 »       ​</​p></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64320952"></​a>8.​1.​1.​11.​·​Kernel·​Internals</​h4></​div></​div></​div><p>While·​ip_forward()​·​calls·​ip_output()​,​·​ip6_forward()​·​directly
3014 »       ​calls·​if_output()​·​since·​routers·​must·​not·​divide·​IPv6·​packets·​into3014 »       ​calls·​if_output()​·​since·​routers·​must·​not·​divide·​IPv6·​packets·​into
3015 »       ​fragments.​</​p><p>ICMPv6·​should·​contain·​the·​original·​packet·​as·​long·​as·​possible3015 »       ​fragments.​</​p><p>ICMPv6·​should·​contain·​the·​original·​packet·​as·​long·​as·​possible
3016 »       ​up·​to·​1280.​··​UDP6/​IP6·​port·​unreach,​·​for·​instance,​·​should·​contain3016 »       ​up·​to·​1280.​··​UDP6/​IP6·​port·​unreach,​·​for·​instance,​·​should·​contain
3017 »       ​all·​extension·​headers·​and·​the·​*unchanged*·​UDP6·​and·​IP6·​headers.​3017 »       ​all·​extension·​headers·​and·​the·​*unchanged*·​UDP6·​and·​IP6·​headers.​
3018 »       ​So,​·​all·​IP6·​functions·​except·​TCP·​never·​convert·​network·​byte3018 »       ​So,​·​all·​IP6·​functions·​except·​TCP·​never·​convert·​network·​byte
3019 »       ​order·​into·​host·​byte·​order,​·​to·​save·​the·​original·​packet.​</​p><p>tcp_input()​,​·​udp6_input()​·​and·​icmp6_input()​·​can·​not·​assume·​that3019 »       ​order·​into·​host·​byte·​order,​·​to·​save·​the·​original·​packet.​</​p><p>tcp_input()​,​·​udp6_input()​·​and·​icmp6_input()​·​can·​not·​assume·​that
3020 »       ​IP6·​header·​is·​preceding·​the·​transport·​headers·​due·​to·​extension3020 »       ​IP6·​header·​is·​preceding·​the·​transport·​headers·​due·​to·​extension
Offset 3103, 35 lines modifiedOffset 3103, 35 lines modified
3103 »       ​itself·​is·​not·​recommended·​as·​it·​does·​not·​handle·​scoped·​IPv6·​addresses3103 »       ​itself·​is·​not·​recommended·​as·​it·​does·​not·​handle·​scoped·​IPv6·​addresses
3104 »       ​at·​all.​··​For·​IPv6·​name·​resolution,​·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=getaddrinfo​&amp;​sektion=3&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>getaddrinfo</​span>(3)​</​span></​a>·​is·​the3104 »       ​at·​all.​··​For·​IPv6·​name·​resolution,​·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=getaddrinfo​&amp;​sektion=3&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>getaddrinfo</​span>(3)​</​span></​a>·​is·​the
3105 »       ​preferred·​API.​·​So·​you·​should·​rewrite·​your·​application·​to·​use3105 »       ​preferred·​API.​·​So·​you·​should·​rewrite·​your·​application·​to·​use
3106 »       ​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=getaddrinfo​&amp;​sektion=3&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>getaddrinfo</​span>(3)​</​span></​a>,​·​when·​you·​get·​the·​time·​to·​do·​it.​</​p><p>When·​writing·​applications·​that·​make·​outgoing·​connections,​3106 »       ​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=getaddrinfo​&amp;​sektion=3&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>getaddrinfo</​span>(3)​</​span></​a>,​·​when·​you·​get·​the·​time·​to·​do·​it.​</​p><p>When·​writing·​applications·​that·​make·​outgoing·​connections,​
3107 »       ​story·​goes·​much·​simpler·​if·​you·​treat·​AF_INET·​and·​AF_INET6·​as·​totally3107 »       ​story·​goes·​much·​simpler·​if·​you·​treat·​AF_INET·​and·​AF_INET6·​as·​totally
3108 »       ​separate·​address·​family.​··​{set,​get}sockopt·​issue·​goes·​simpler,​3108 »       ​separate·​address·​family.​··​{set,​get}sockopt·​issue·​goes·​simpler,​
3109 »       ​DNS·​issue·​will·​be·​made·​simpler.​··​We·​do·​not·​recommend·​you·​to·​rely3109 »       ​DNS·​issue·​will·​be·​made·​simpler.​··​We·​do·​not·​recommend·​you·​to·​rely
3110 »       ​upon·​IPv4·​mapped·​address.​</​p><div·​class="sect4"><div·​xmlns=""·​class="titlepage"><di​v><div><h5·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64300088"></​a>8.​1.​1.​12.​1.​·​unified·​tcp·​and·​inpcb·​code</​h5></​div></​div></​div><p>FreeBSD·​4.​x·​uses·​shared·​tcp·​code·​between·​IPv4·​and·​IPv63110 »       ​upon·​IPv4·​mapped·​address.​</​p><div·​class="sect4"><div·​xmlns=""·​class="titlepage"><di​v><div><h5·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64357432"></​a>8.​1.​1.​12.​1.​·​unified·​tcp·​and·​inpcb·​code</​h5></​div></​div></​div><p>FreeBSD·​4.​x·​uses·​shared·​tcp·​code·​between·​IPv4·​and·​IPv6
3111 »       ​··​(from·​sys/​netinet/​tcp*)​·​and·​separate·​udp4/​6·​code.​··​It·​uses3111 »       ​··​(from·​sys/​netinet/​tcp*)​·​and·​separate·​udp4/​6·​code.​··​It·​uses
3112 »       ​··​unified·​inpcb·​structure.​</​p><p>The·​platform·​can·​be·​configured·​to·​support·​IPv4·​mapped·​address.​3112 »       ​··​unified·​inpcb·​structure.​</​p><p>The·​platform·​can·​be·​configured·​to·​support·​IPv4·​mapped·​address.​
3113 »       ​··​Kernel·​configuration·​is·​summarized·​as·​follows:​</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>B​y·​default,​·​AF_INET6·​socket·​will·​grab·​IPv43113 »       ​··​Kernel·​configuration·​is·​summarized·​as·​follows:​</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>B​y·​default,​·​AF_INET6·​socket·​will·​grab·​IPv4
3114 »       ​······​connections·​in·​certain·​condition,​·​and·​can·​initiate3114 »       ​······​connections·​in·​certain·​condition,​·​and·​can·​initiate
3115 »       ​······​connection·​to·​IPv4·​destination·​embedded·​in·​IPv4·​mapped3115 »       ​······​connection·​to·​IPv4·​destination·​embedded·​in·​IPv4·​mapped
3116 »       ​······​IPv6·​address.​</​p></​li><li·​class="listitem"><p>Y​ou·​can·​disable·​it·​on·​entire·​system·​with·​sysctl·​like3116 »       ​······​IPv6·​address.​</​p></​li><li·​class="listitem"><p>Y​ou·​can·​disable·​it·​on·​entire·​system·​with·​sysctl·​like
3117 »       ​······​below.​</​p><p>3117 »       ​······​below.​</​p><p>
3118 »       ​········​<code·​class="command">sysct​l·​net.​inet6.​ip6.​mapped_addr=0</​code>3118 »       ​········​<code·​class="command">sysct​l·​net.​inet6.​ip6.​mapped_addr=0</​code>
3119 »       ​······​</​p></​li></​ul></​div><div·​class="sect5"><div·​xmlns=""·​class="titlepage"><di​v><div><h6·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64304312"></​a>8.​1.​1.​12.​1.​1.​·​listening·​side</​h6></​div></​div></​div><p>Each·​socket·​can·​be·​configured·​to·​support·​special·​AF_INET63119 »       ​······​</​p></​li></​ul></​div><div·​class="sect5"><div·​xmlns=""·​class="titlepage"><di​v><div><h6·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64361656"></​a>8.​1.​1.​12.​1.​1.​·​listening·​side</​h6></​div></​div></​div><p>Each·​socket·​can·​be·​configured·​to·​support·​special·​AF_INET6
3120 »       ​····​wildcard·​bind·​(enabled·​by·​default)​.​··​You·​can·​disable·​it·​on3120 »       ​····​wildcard·​bind·​(enabled·​by·​default)​.​··​You·​can·​disable·​it·​on
3121 »       ​····​each·​socket·​basis·​with·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=setsockopt&​amp;​sektion=2&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>setsockopt</​span>(2)​</​span></​a>·​like·​below.​</​p><pre·​class="screen">»​int·​on;​3121 »       ​····​each·​socket·​basis·​with·​<a·​class="citerefentry"·​href="http:​/​/​www.​FreeBSD.​org/​cgi/​man.​cgi?query=setsockopt&​amp;​sektion=2&amp;​manpath=freebsd-​release-​ports"><span·​class="citerefentry">​<span·​class="refentrytitle"​>setsockopt</​span>(2)​</​span></​a>·​like·​below.​</​p><pre·​class="screen">»​int·​on;​
  
3122 »       ​setsockopt(s,​·​IPPROTO_IPV6,​·​IPV6_BINDV6ONLY,​3122 »       ​setsockopt(s,​·​IPPROTO_IPV6,​·​IPV6_BINDV6ONLY,​
3123 »       ​»       ​···​(char·​*)​&amp;​on,​·​sizeof·​(on)​)​·​&lt;​·​0)​)​;​3123 »       ​»       ​···​(char·​*)​&amp;​on,​·​sizeof·​(on)​)​·​&lt;​·​0)​)​;​
3124 »       ​</​pre><p>Wildcard·​AF_INET6·​socket·​grabs·​IPv4·​connection·​if·​and·​only3124 »       ​</​pre><p>Wildcard·​AF_INET6·​socket·​grabs·​IPv4·​connection·​if·​and·​only
3125 »       ​····​if·​the·​following·​conditions·​are·​satisfied:​</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>t​here·​is·​no·​AF_INET·​socket·​that·​matches·​the·​IPv43125 »       ​····​if·​the·​following·​conditions·​are·​satisfied:​</​p><div·​class="itemizedlist">​<ul·​class="itemizedlist"·​style="list-​style-​type:​·​disc;​·​"><li·​class="listitem"><p>t​here·​is·​no·​AF_INET·​socket·​that·​matches·​the·​IPv4
3126 »       ​»       ​connection</​p></​li><li·​class="listitem"><p>t​he·​AF_INET6·​socket·​is·​configured·​to·​accept·​IPv43126 »       ​»       ​connection</​p></​li><li·​class="listitem"><p>t​he·​AF_INET6·​socket·​is·​configured·​to·​accept·​IPv4
3127 »       ​»       ​traffic,​·​i.​e.​··​getsockopt(IPV6_BINDV​6ONLY)​·​returns·​0.​</​p></​li></​ul></​div><p>There·​is·​no·​problem·​with·​open/​close·​ordering.​</​p></​div><div·​class="sect5"><div·​xmlns=""·​class="titlepage"><di​v><div><h6·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64309304"></​a>8.​1.​1.​12.​1.​2.​·​initiating·​side</​h6></​div></​div></​div><p>FreeBSD·​4.​x·​supports·​outgoing·​connection·​to·​IPv4·​mapped3127 »       ​»       ​traffic,​·​i.​e.​··​getsockopt(IPV6_BINDV​6ONLY)​·​returns·​0.​</​p></​li></​ul></​div><p>There·​is·​no·​problem·​with·​open/​close·​ordering.​</​p></​div><div·​class="sect5"><div·​xmlns=""·​class="titlepage"><di​v><div><h6·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64366648"></​a>8.​1.​1.​12.​1.​2.​·​initiating·​side</​h6></​div></​div></​div><p>FreeBSD·​4.​x·​supports·​outgoing·​connection·​to·​IPv4·​mapped
3128 »       ​····​address·​(:​:​ffff:​10.​1.​1.​1)​,​·​if·​the·​node·​is·​configured·​to·​support3128 »       ​····​address·​(:​:​ffff:​10.​1.​1.​1)​,​·​if·​the·​node·​is·​configured·​to·​support
3129 »       ​····​IPv4·​mapped·​address.​</​p></​div></​div></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64314808"></​a>8.​1.​1.​13.​·​sockaddr_storage</​h4></​div></​div></​div><p>When·​RFC2553·​was·​about·​to·​be·​finalized,​·​there·​was·​discussion·​on3129 »       ​····​IPv4·​mapped·​address.​</​p></​div></​div></​div><div·​class="sect3"><div·​xmlns=""·​class="titlepage"><di​v><div><h4·​xmlns="http:​/​/​www.​w3.​org/​1999/​xhtml"·​class="title"><a·​id="idp64372152"></​a>8.​1.​1.​13.​·​sockaddr_storage</​h4></​div></​div></​div><p>When·​RFC2553·​was·​about·​to·​be·​finalized,​·​there·​was·​discussion·​on
3130 »       ​how·​struct·​sockaddr_storage·​members·​are·​named.​··​One·​proposal·​is·​to3130 »       ​how·​struct·​sockaddr_storage·​members·​are·​named.​··​One·​proposal·​is·​to
3131 »       ​prepend·​"__"·​to·​the·​members·​(like·​"__ss_len")​·​as·​they·​should·​not·​be3131 »       ​prepend·​"__"·​to·​the·​members·​(like·​"__ss_len")​·​as·​they·​should·​not·​be
3132 »       ​touched.​··​The·​other·​proposal·​was·​not·​to·​prepend·​it·​(like·​"ss_len")​3132 »       ​touched.​··​The·​other·​proposal·​was·​not·​to·​prepend·​it·​(like·​"ss_len")​
3133 »       ​as·​we·​need·​to·​touch·​those·​members·​directly.​··​There·​was·​no·​clear3133 »       ​as·​we·​need·​to·​touch·​those·​members·​directly.​··​There·​was·​no·​clear
3134 »       ​consensus·​on·​it.​</​p><p>As·​a·​result,​·​RFC2553·​defines·​struct·​sockaddr_storage·​as3134 »       ​consensus·​on·​it.​</​p><p>As·​a·​result,​·​RFC2553·​defines·​struct·​sockaddr_storage·​as
3135 »       ​follows:​</​p><pre·​class="screen">»​struct·​sockaddr_storage·​{3135 »       ​follows:​</​p><pre·​class="screen">»​struct·​sockaddr_storage·​{
3136 »       ​»       ​u_char» ​__ss_len;​»       ​/​*·​address·​length·​*/​3136 »       ​»       ​u_char» ​__ss_len;​»       ​/​*·​address·​length·​*/​
Offset 3148, 64 lines modifiedOffset 3148, 64 lines modified
3148 »       ​RFC2553bis·​discussion.​</​p><p>If·​you·​look·​at·​multiple·​IPv6·​implementations,​·​you·​will·​be·​able3148 »       ​RFC2553bis·​discussion.​</​p><p>If·​you·​look·​at·​multiple·​IPv6·​implementations,​·​you·​will·​be·​able
Max output size reached.