{"id":285946,"date":"2017-05-04T23:00:03","date_gmt":"2017-05-04T19:00:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=285946"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=285946","title":{"rendered":"\u0421\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Linux \u043f\u043e\u0441\u043b\u0435 SysV"},"content":{"rendered":"<p>Init \u2014 \u044d\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u044f\u0434\u0440\u043e Linux \/ Unix \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u041e\u043d \u0438\u043c\u0435\u0435\u0442 PID 1, \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u043c, \u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c, \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0432 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b. Init \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u043c\u043e\u043d\u044b, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0441\u043b\u0443\u0436\u0431\u044b \u0438 \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0441\u043e\u0431\u043e\u0439 \u043a\u043e\u0440\u0435\u043d\u044c \u0434\u0440\u0435\u0432\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a4a\/af6\/bd4\/a4aaf6bd497e421dab1dfa2c28867623.png\"\/>  <\/p>\n<p>  <\/p>\n<p>  <\/p>\n<p>\u042f \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0431\u0437\u043e\u0440 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u041e\u0421, \u043d\u043e \u043d\u0430\u0447\u0430\u0432 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 <em>daemontools<\/em> \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0448\u044c \u0432 \u043a\u0440\u043e\u043b\u0438\u0447\u044c\u044e \u043d\u043e\u0440\u0443, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0439\u0442\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043e\u0437\u0440\u0435\u0432 \u0432\u0441\u0435 \u0447\u0443\u0434\u0435\u0441\u0430 \u043f\u043e\u0434\u0437\u0435\u043c\u043d\u043e\u0433\u043e \u0446\u0430\u0440\u0441\u0442\u0432\u0430. \u041f\u0440\u043e\u0448\u0443 \u0432\u043d\u0443\u0442\u0440\u044c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0441\u0430\u043c\u043e\u0439 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e\u0439, \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0432\u043b\u0438\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043b\u0443\u0436\u0431\u0430\u043c\u0438 \u0432 Unix \/ Linux \u0438 \u0435\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h3 id=\"djb-i-daemontools\">DJB \u0438 Daemontools<\/h3>\n<p>  <\/p>\n<p>\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u2014 <strong>\u043d\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0443\u0442\u0430\u0442\u044c<\/strong> <em>daemontools<\/em> \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 DJB \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439-\u0442\u0435\u0437\u043a\u043e\u0439 <a href=\"https:\/\/www.daemon-tools.cc\/deu\/home\">DAEMON Tools<\/a> \u0434\u043b\u044f \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f iso \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 CD\/DVD \u0434\u0438\u0441\u043a\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0442\u044c\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043a\u0440\u0430\u0442\u043a\u043e \u0440\u0435\u0437\u044e\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u044e init \u0441\u0438\u0441\u0442\u0435\u043c \u043d\u0430 \u041e\u0421 Linux, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0435\u0435 \u0441\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u043e\u043f\u044b\u0442\u043a\u0430\u043c \u043d\u0430\u0439\u0442\u0438 \u0443\u0434\u0430\u0447\u043d\u0443\u044e \u0437\u0430\u043c\u0435\u043d\u0443 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0439 <a href=\"https:\/\/wiki.archlinux.org\/index.php\/SysVinit\">sysvinit<\/a>. \u0414\u043e \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u044b 2000-\u0445 \u043d\u0438\u043a\u043e\u043c\u0443 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e \u0447\u0442\u043e-\u0442\u043e \u043c\u0435\u043d\u044f\u0442\u044c, \u043f\u043e\u0447\u0442\u0438 \u043d\u0438\u043a\u043e\u043c\u0443. Gentoo \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0430 \u0438 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u043b\u0430 <a href=\"https:\/\/wiki.gentoo.org\/wiki\/OpenRC\">OpenRC<\/a>. \u0412\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c \u0441 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c <a href=\"http:\/\/web.archive.org\/web\/20070704235452\/http:\/\/developer.apple.com\/macosx\/launchd.html\">launchd<\/a> \u0432 Mac OS X. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 Ubuntu \u0431\u0440\u043e\u0441\u0438\u043b\u0438\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c <a href=\"http:\/\/upstart.ubuntu.com\/\">Upstart<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b\u0438 \u043f\u043e\u0437\u0430\u0438\u043c\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0434\u0435\u0438 \u0438\u0437 <code>launchd<\/code>. \u0414\u0435\u043b\u043e \u0448\u043b\u043e \u043d\u0435 \u0448\u0430\u0442\u043a\u043e, \u043d\u0435 \u0432\u0430\u043b\u043a\u043e, \u0438 \u0442\u0443\u0442 \u0441\u043b\u0443\u0447\u0438\u043b\u0441\u044f <a href=\"https:\/\/www.freedesktop.org\/wiki\/Software\/systemd\/\">systemd<\/a>.<\/p>\n<p>  <\/p>\n<p>Daniel J. Bernstein \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a \u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442 \u043f\u043e \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438, \u0430\u0432\u0442\u043e\u0440 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e MTA <a href=\"http:\/\/cr.yp.to\/qmail.html\">qmail<\/a> \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u043d\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u0441\u0440\u0435\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f <a href=\"http:\/\/cr.yp.to\/daemontools.html\">daemontools<\/a>. \u0414\u043b\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <em>daemontools<\/em> \u044f\u0432\u043b\u044f\u043b\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0438 \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u0442\u0435\u043b\u0435\u043c.<\/p>\n<p>  <\/p>\n<blockquote><p><em>\u0423\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u041c\u0430\u043a\u0441\u0432\u0435\u043b\u043b\u0430 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438 \u043d\u0430 Unix \u041e\u0421<\/em>.<\/p><\/blockquote>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441, \u043a\u043e\u0433\u0434\u0430 \u0432 Linux \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u043a\u043e\u043b \u0438\u0437-\u0437\u0430 systemd, \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043a\u0430\u043a\u0438\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u043d\u0438\u0442 \u0432 \u0434\u0443\u0445\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432 \u0438 \u0444\u0438\u043b\u043e\u0441\u043e\u0444\u0438\u0438 Unix. \u0412 \u044d\u0442\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435 \u0434\u0437\u0435\u043d-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 DJB \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u043f\u043b\u043e\u0449\u0435\u043d\u0438\u0435\u043c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0437\u043c\u0430 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b, \u0430 \u0431\u0440\u0438\u0442\u0432\u0430 \u041e\u043a\u043a\u0430\u043c\u0430 \u0443 \u043d\u0435\u0433\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0432 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0443. \u0415\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b \u0438 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u044b, \u043d\u0430 \u044d\u0442\u043e\u043c \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0435 \u043e\u043d \u0441\u0442\u0440\u043e\u0438\u0442 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0435, \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435 \u041f\u041e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u041e\u0421. \u0412\u043e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0435\u0433\u043e \u0441\u0442\u0438\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0421\u0430\u043c\u044b\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0444\u0430\u0439\u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 <code>multilog.c<\/code> \u0438\u043c\u0435\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c 13898, \u043d\u0435\u0442 \u043d\u0435 \u0441\u0442\u0440\u043e\u043a, \u0430 \u0431\u0430\u0439\u0442\u043e\u0432. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>wc<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043b\u0438\u0448\u044c \u043d\u0430 617 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430.<\/li>\n<li>\u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u043c\u0435\u044e\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 30 \u0441\u0442\u0440\u043e\u043a.<\/li>\n<li>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u2014 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0438\u0447\u0435\u0433\u043e <strong>\u043d\u0435 \u043f\u0430\u0440\u0441\u0438\u0442\u044c<\/strong>.<\/li>\n<li>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435, \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u041e\u0421 \u0438 \u043d\u0435 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u044c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u044b.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b, \u0438 \u0435\u0449\u0435 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0430\u0432\u0442\u043e\u0440 \u0438\u0441\u043f\u043e\u0432\u0435\u0434\u0443\u0435\u0442 \u0438\u0445 \u0444\u0430\u043d\u0430\u0442\u0438\u0447\u043d\u043e? \u0421\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b <em>daemontools<\/em> \u2014 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, FIFO, \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u043c\u0430\u0441\u0441\u0443 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u043b\u0443\u0436\u0431\u044b \u043f\u0440\u043e\u0449\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u2014 \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b <code>.\/run<\/code>, \u0442\u043e \u0438 \u0441\u043b\u0443\u0436\u0431\u0430 \u0442\u043e\u0436\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f.<\/li>\n<li>\u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e Bash. \u0421\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0430\u0436\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a.<\/li>\n<li>\u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u0430\u0436\u0435 \u0431\u0435\u0437 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/li>\n<li>\u041f\u0430\u0440\u0441\u0438\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u2014 \u043d\u0430 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/Bashdoor\">\u0442\u0440\u0443\u0434\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430<\/a>, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e \u0443\u043c\u0443. \u0410\u0432\u0442\u043e\u0440 \u0438\u0437\u0431\u0435\u0433\u0430\u0435\u0442 \u044d\u0442\u043e\u0433\u043e, \u0443\u043c\u0435\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b Unix \u0434\u043b\u044f \u0432\u043e\u0441\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u044b <code>\u043a\u043b\u044e\u0447=\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/code>.<\/li>\n<\/ul>\n<p>  <\/p>\n<h4 id=\"sravnitelnaya-tablica-dt\">\u0421\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 DT<\/h4>\n<p>  <\/p>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u043e\u0440\u0442\u043e\u0434\u043e\u043a\u0441\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 <em>daemontools<\/em>, \u043d\u0438\u0447\u0442\u043e\u0436\u0435 \u0441\u0443\u043c\u043d\u044f\u0448\u0435\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438 \u0432 \u043a\u043e\u0440\u043d\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b Unix. DJB \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043b \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438<code>\/service<\/code>, <code>\/command<\/code> \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c <code>\/package<\/code> \u0434\u043b\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u042d\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u044c\u043c\u0430 \u0434\u0443\u0440\u043d\u044b\u043c \u0442\u043e\u043d\u043e\u043c \u0432 Unix \u0438 Linux, \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u0438 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u0432 \u0432\u0441\u0435\u043c\u0438 \u0441\u0438\u043b\u0430\u043c\u0438 \u0438\u0437\u0431\u0435\u0433\u0430\u044e\u0442 \u044d\u0442\u043e\u0433\u043e, \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 root.<\/p>\n<p>  <\/p>\n<table>\n<thead>\n<tr>\n<th><strong>features<\/strong><\/th>\n<th><strong>inittab<\/strong><\/th>\n<th><strong>ttys<\/strong><\/th>\n<th><strong>init.d<\/strong><\/th>\n<th><strong>rc.local<\/strong><\/th>\n<th><strong>\/service<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Easy service installation and removal<\/td>\n<td>No<\/td>\n<td>No<\/td>\n<td>Yes<\/td>\n<td>No<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>Easy first-time service startup<\/td>\n<td>No<\/td>\n<td>No<\/td>\n<td>No<\/td>\n<td>No<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>Reliable restarts<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td>No<\/td>\n<td>No<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>Easy, reliable signalling<\/td>\n<td>No<\/td>\n<td>No<\/td>\n<td>No<\/td>\n<td>No<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>Clean process state<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td>No<\/td>\n<td>No<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>Portability<\/td>\n<td>No<\/td>\n<td>No<\/td>\n<td>No<\/td>\n<td>No<\/td>\n<td>Yes<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0431\u0435\u0436\u0438\u043c\u0441\u044f \u043f\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0441\u0430\u043c\u043e\u0432\u043e\u0441\u0445\u0432\u0430\u043b\u0435\u043d\u0438\u044f <em>daemontools<\/em>. \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0438. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043f\u0440\u043e\u0449\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e, \u0434\u043e\u0431\u0430\u0432\u0438\u043b, \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0438\u043b \u043d\u043e\u0432\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0432 <code>\/service<\/code> \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0444\u0430\u0439\u043b\u043e\u043c <code>.\/run<\/code> \u0438 \u043d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435. \u0421\u0440\u0430\u0432\u043d\u0438\u0442\u0435 \u0441\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438 sysvinit \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0438\u0442\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u0442\u043e\u0433\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0433\u043e.<\/p>\n<p>  <\/p>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0443\u043d\u043a\u0442 \u043c\u0435\u043d\u0435\u0435 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u0435\u043d \u0432 \u0442\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435, \u0447\u0442\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u043f\u0440\u043e\u0449\u0435 \u043a\u043e\u0433\u0434\u0430 \u0441\u0435\u0440\u0432\u0438\u0441 \u0438 \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043d\u043e \u0432 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043b\u0443\u0436\u0431\u0430\u043c\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0430 \u0441\u043b\u0443\u0436\u0431\u044b.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441 \u0432 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0431\u044b\u043b\u0430 \u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0432\u043f\u0435\u0440\u0435\u0434. \u041d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u044d\u0442\u043e \u0443\u0436\u0435 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0432\u0435\u0449\u0435\u0439.<\/p>\n<p>  <\/p>\n<p>\u0427\u0435\u0442\u0432\u0435\u0440\u0442\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u2014 \u0441\u0438\u0433\u043d\u0430\u043b\u044b. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>svc<\/code>, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0441\u043b\u0430\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u044e\u0431\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b POSIX \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0432\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043a\u0430\u0436\u0443\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0434\u0443\u043c\u0430\u043d\u043d\u044b\u043c\u0438, \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043a\u0430\u043a <em>daemontools<\/em> \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0438\u0442\u043e\u0432. \u041d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0442\u0430\u043a\u0436\u0435, \u043f\u043e\u0447\u0435\u043c\u0443 \u0430\u0432\u0442\u043e\u0440 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u043e\u0439 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/p>\n<p>  <\/p>\n<h4 id=\"struktura-dt\">\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 DT<\/h4>\n<p>  <\/p>\n<p>\u041f\u043e \u0441\u043b\u043e\u0432\u0430\u043c \u0430\u0432\u0442\u043e\u0440\u0430: <em>daemontools<\/em> \u2014 \u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043b\u0443\u0436\u0431\u0430\u043c\u0438 UNIX. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u043e\u0442\u043b\u0438\u0447\u0438\u044f\u043c\u0438 \u043e\u0442 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0438\u043d\u0438\u0442\u043e\u0432 (\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 rcX.d, rc.d, rc.local \u0438 \u043f\u0440.) \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0433\u043e \u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438 \u0440\u043e\u0442\u0430\u0446\u0438\u0438 \u043b\u043e\u0433\u043e\u0432 \u2014 multilog. \u0422\u0430\u043a\u0436\u0435, multilog \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0435\u0441\u0442\u0438 \u043b\u043e\u0433 \u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u043d\u0435 \u0443\u043c\u0435\u044e\u0449\u0438\u0445 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u0432 <code>syslog<\/code>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u0430\u043a \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0435.<\/p>\n<p>  <\/p>\n<p><em>\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e daemontools, \u0433\u0440\u0430\u043d\u0438\u0446\u0430 \u043e\u0431\u0432\u0435\u0434\u0435\u043d\u0430 \u043a\u0440\u0430\u0441\u043d\u043e\u0439 \u043f\u0440\u0435\u0440\u044b\u0432\u0438\u0441\u0442\u043e\u0439 \u043b\u0438\u043d\u0438\u0435\u0439.<\/em><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/52d\/157\/55e\/52d15755e9f5455e8f983ec0fbbb2abc.png\"\/>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u0445 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0438\u043d\u0438\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 <code>svscanboot<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 <code>svscan<\/code> \u0432 \u043d\u043e\u0432\u043e-\u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>svscan<\/code>. \u0414\u0430\u043b\u0435\u0435 <code>svscanboo<\/code> \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u044b\u0432\u043e\u0434 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e <code>svscan<\/code> \u0432 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 <code>readproctitle<\/code>.<\/p>\n<p>  <\/p>\n<p>\u042f\u0434\u0440\u043e\u043c <em>daemontools<\/em> \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b: <code>svscan<\/code> \u0438 <code>supervise<\/code>. \u041f\u0435\u0440\u0432\u0430\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u043e \u0432\u044b\u0431\u043e\u0440\u0443, \u0430 \u0432\u0442\u043e\u0440\u0430\u044f \u0441 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u0435\u043c.<\/p>\n<p>  <\/p>\n<p><strong>Svscan<\/strong> \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u0441\u043b\u0435\u0436\u0435\u043d\u0438\u044f \u0437\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438. \u041a\u0430\u0436\u0434\u044b\u0435 5 \u0441\u0435\u043a\u0443\u043d\u0434 <code>Svscan<\/code> \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 <code>\/service<\/code>, \u0435\u0441\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d, \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432. \u0415\u0441\u043b\u0438 \u0442\u0430\u043a\u0438\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u044b, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u043a\u043e\u043f\u0438\u044f <code>supervise<\/code> \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430.<\/p>\n<p>  <\/p>\n<p><strong>Supervise<\/strong> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c. \u041e\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0438\u043c\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0438 \u0432 \u043d\u0435\u043c \u0438\u0449\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 <code>.\/run<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442. \u0415\u0441\u043b\u0438 \u043f\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c <code>.\/run<\/code> \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f, \u0442\u043e \u0442\u043e\u0433\u0434\u0430 <code>supervise<\/code> \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0430\u0443\u0437\u044b \u2014 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 \u041e\u0421. <code>Supervise<\/code> \u043d\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 <code>.\/run<\/code>, \u0435\u0441\u043b\u0438 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d \u0444\u0430\u0439\u043b <code>.\/down<\/code>. <code>Supervise<\/code> \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433 <code>.\/supervise<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435. \u042d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b <code>svstat<\/code>. \u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c \u0441\u043b\u0443\u0436\u0438\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 <code>svc<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>svc<\/code> \u0438 \u043e\u043f\u0446\u0438\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043d\u0438\u0436\u0435.<\/p>\n<p>  <\/p>\n<pre><code>svc options services<\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li>-u: Up, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0430 \u2014 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c.<\/li>\n<li>-d: Down, \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441.<\/li>\n<li>-t: Terminate, \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0441\u0438\u0433\u043d\u0430\u043b TERM.<\/li>\n<li>-k: Kill, \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0441\u0438\u0433\u043d\u0430\u043b KILL.<\/li>\n<li>-p: Pause, \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0441\u0438\u0433\u043d\u0430\u043b STOP.<\/li>\n<li>-c: Continue, \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0441\u0438\u0433\u043d\u0430\u043b CONT.<\/li>\n<li>-h: Hangup, \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0441\u0438\u0433\u043d\u0430\u043b HUP.<\/li>\n<li>-a: Alarm, \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0441\u0438\u0433\u043d\u0430\u043b ALRM.<\/li>\n<li>-h: Interrupt, \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0441\u0438\u0433\u043d\u0430\u043b INT.<\/li>\n<li>-x: Exit, <code>supervise<\/code> \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e <code>.\/run<\/code> \u0438\u043b\u0438 \u0435\u0433\u043e \u043f\u043e\u0442\u043e\u043c\u043e\u043a \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f.<\/li>\n<li>-o: Once, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441, \u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0415\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e, \u0435\u0441\u043b\u0438 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <code>supervise<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433 <code>.\/log<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0435\u0441\u0442\u044c <code>.\/log\/run<\/code>, \u0442\u043e \u0442\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u043a\u043e\u043f\u0438\u044f <code>supervise<\/code> \u0438 \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u0430\u043d\u0430\u043b \u043c\u0435\u0436\u0434\u0443 <code>.\/run<\/code> \u0438 <code>.\/log\/run<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 sshd.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">#!\/bin\/sh  # \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c stderr \u0432 stdout exec 2&gt;&amp;1  # \u0441 \u043e\u043f\u0446\u0438\u0435\u0439 -D sshd \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u044f\u0432\u043d\u043e, \u0441 \u043e\u043f\u0446\u0438\u0435\u0439 -e \u043e\u0442\u043b\u0430\u0434\u043a\u0430 \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u0432 stderr exec \/usr\/sbin\/sshd -D -e<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a.<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">- service\/   |- ngetty\/   |  |- run   |  |- log\/   |     |- run   |- sshd\/   |  |- run   |  |- log\/   |     |- run   |- squid\/   |  |- run   |  |- log\/   |     |- run<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a <code>svscan<\/code> \u043f\u0440\u043e\u0431\u0435\u0436\u0438\u0442\u0441\u044f \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0441\u043f\u0438\u0441\u043a\u0443 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0434\u0435\u0440\u0435\u0432\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b <code>service<\/code> \u0441\u043b\u0435\u0434\u044f\u0442 \u0437\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 \u0438 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">-svscan-+-service-+-ngetty         |         `-log-service         +-service-+-sshd         |         `-log-service         +-service-+-crond         |         `-log-service<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"zavisimosti-mezhdu-sluzhbami\">\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u043b\u0443\u0436\u0431\u0430\u043c\u0438<\/h4>\n<p>  <\/p>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u043b\u0443\u0436\u0431\u0430\u043c\u0438, \u0435\u0441\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0443\u0447\u0435\u0442\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e <code>svok<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">#!\/bin\/sh svok postgres || (echo &quot;waiting for postgres...&quot; &amp;&amp; exit 1) exec 2&gt;&amp;1 exec python3 your-web-app.py<\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li>svok \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u043b\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u0441\u043b\u0443\u0436\u0431\u0430. \u041d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432 <code>stdout<\/code> \u0438 <code>stderr<\/code>, \u0435\u0441\u043b\u0438 \u0441\u043b\u0443\u0436\u0431\u0430 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430, \u0442\u043e \u0442\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u043e\u0434 0, \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u043a\u043e\u0434 100.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430 python \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u043b postgres, \u0435\u0441\u043b\u0438 \u0436\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u0434\u043d\u044f\u043b\u0441\u044f, \u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f \u0438 \u0437\u0430\u0442\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e \u0432\u0440\u0435\u043c\u044f <code>svscan<\/code> \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442. \u041a\u043e\u0433\u0434\u0430 \u0436\u0435 postgres \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u043f\u043e\u0434\u043d\u0438\u043c\u0435\u0442\u0441\u044f, python \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u0432\u0435\u0431 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<h4 id=\"kvotirovanie-servisa\">\u041a\u0432\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430<\/h4>\n<p>  <\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b <code>softlimit<\/code> \u043c\u043e\u0436\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u044b.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">#!\/bin\/sh exec 2&gt;&amp;1  # \u0441\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 foo, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u0441\u0442\u0435\u043a 4096 \u0431\u0430\u0439\u0442\u0430\u043c\u0438, \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 # \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u044b 15 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 1:  exec setuidgid foo softlimit -n 4096 -o 15 -p 1 \\      bar -n<\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li>softlimit \u2014 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u043d\u044b\u043c\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438.<\/li>\n<\/ul>\n<p>  <\/p>\n<h4 id=\"logirovanie\">\u041b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h4>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 <code>foo<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0432\u0435\u0434\u0435\u0442 \u043b\u043e\u0433\u043e\u0432, \u0432\u044b \u0431\u0435\u0437 \u0442\u0440\u0443\u0434\u0430 \u0441\u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>multilog<\/code>, \u0441\u043e\u0431\u0440\u0430\u0432 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0432\u044b\u0432\u043e\u0434 <code>stdout<\/code> \u0438 <code>stderr<\/code> \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u043a\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<pre><code>[root@home: +5] cd \/service\/foo &amp;&amp; mkdir log [root@home: +5] cd log &amp;&amp; mkdir mail [root@home: +5] nano run.new #\u043f\u0438\u0448\u0435\u043c \u0432 \u0444\u0430\u0439\u043b #!\/bin\/sh exec 2&gt;&amp;1 exec multilog t .\/main  [root@home: +5] chmod u+x run.new [root@home: +5] mv run.new run [root@home: +5] cd \/service [root@home: +5] svc -t foo<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c:<\/p>\n<p>  <\/p>\n<pre><code>tail -fn0 \/service\/foo\/main\/current<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"posledovateli-daemontools\">\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0438 daemontools<\/h3>\n<p>  <\/p>\n<p>\u041c\u0430\u043b\u043e \u043a\u0442\u043e \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 DT, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e Daniel J. Bernstein \u0441\u0442\u0430\u043b \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c, \u0430 \u0434\u0435\u043b\u043e \u0435\u0433\u043e \u0436\u0438\u0432\u0435\u0442 \u0438 \u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0435\u0442. \u0412\u043e\u0442 \u043d\u0435\u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"http:\/\/untroubled.org\/daemontools-encore\/\">daemontools-encore<\/a> \u2014 \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a Bruce Guenter, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u043c \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435\u043c DT. \u041d\u0435 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0438\u0442, \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0438 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b.<\/li>\n<li><a href=\"http:\/\/smarden.org\/runit\/\">runit<\/a> \u2014 \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a Gerrit Pape, \u0443\u043c\u0435\u0435\u0442 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u044b. <a href=\"https:\/\/habrahabr.ru\/post\/83775\/\">\u0425\u0430\u0431\u0440\u0430\u043f\u043e\u0441\u0442<\/a>.<\/li>\n<li><a href=\"http:\/\/skarnet.org\/software\/s6\/index.html\">s6<\/a> \u2014 \u041f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u0438\u043d\u0438\u0442 \u0441 PID 1.<\/li>\n<li><a href=\"http:\/\/homepage.ntlworld.com\/jonathan.deboynepollard\/Softwares\/nosh.html\">nosh<\/a> \u2014 \u041b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u044b\u0439 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0434\u043b\u044f BSD \u0438 Linux, \u0443\u043c\u0435\u0435\u0442 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u044b.<\/li>\n<\/ul>\n<p>  <\/p>\n<h4 id=\"ispolzovannye-materialy\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b<\/h4>\n<p>  <\/p>\n<ol>\n<li><a href=\"http:\/\/blog.infinitenegativeutility.com\/2015\/2\/celebrating-daemontools\">Celebrating Daemontools<\/a><\/li>\n<li><a href=\"http:\/\/www.troubleshooters.com\/linux\/djbdns\/daemontools_intro.htm\">Daemontools Intro<\/a><\/li>\n<li><a href=\"http:\/\/lithium.opennet.ru\/daemontools.html\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 Daemontools<\/a><\/li>\n<\/ol>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/327728\/\"> https:\/\/habrahabr.ru\/post\/327728\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Init \u2014 \u044d\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u044f\u0434\u0440\u043e Linux \/ Unix \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u041e\u043d \u0438\u043c\u0435\u0435\u0442 PID 1, \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u043c, \u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c, \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0432 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b. Init \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u043c\u043e\u043d\u044b, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0441\u043b\u0443\u0436\u0431\u044b \u0438 \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0441\u043e\u0431\u043e\u0439 \u043a\u043e\u0440\u0435\u043d\u044c \u0434\u0440\u0435\u0432\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a4a\/af6\/bd4\/a4aaf6bd497e421dab1dfa2c28867623.png\"\/>  <\/p>\n<p>  <\/p>\n<p>  <\/p>\n<p>\u042f \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0431\u0437\u043e\u0440 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u041e\u0421, \u043d\u043e \u043d\u0430\u0447\u0430\u0432 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 <em>daemontools<\/em> \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0448\u044c \u0432 \u043a\u0440\u043e\u043b\u0438\u0447\u044c\u044e \u043d\u043e\u0440\u0443, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0439\u0442\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043e\u0437\u0440\u0435\u0432 \u0432\u0441\u0435 \u0447\u0443\u0434\u0435\u0441\u0430 \u043f\u043e\u0434\u0437\u0435\u043c\u043d\u043e\u0433\u043e \u0446\u0430\u0440\u0441\u0442\u0432\u0430. \u041f\u0440\u043e\u0448\u0443 \u0432\u043d\u0443\u0442\u0440\u044c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0441\u0430\u043c\u043e\u0439 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e\u0439, \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0432\u043b\u0438\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043b\u0443\u0436\u0431\u0430\u043c\u0438 \u0432 Unix \/ Linux \u0438 \u0435\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-285946","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/285946","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=285946"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/285946\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=285946"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=285946"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=285946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}