亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? notes

?? 一個使用des加密傳輸的unix下的login程序的服務器端和客戶端
??
字號:
Notes on bi-directional simultanious I/O: (from barrett@asgard.cs.colorado.edu)Problems Discussed:   - How do you prevent a write from blocking when select(2) returns true?   - How do you detect when the slave side of the pty closes (logout) ?   - How do you prevent the deamon from creating zombie processes ?   - Portability NotesPorting Notes:A strong attempt has been made to use POSIX compatable functions as muchas possible.  Obviously, POSIX does not define everything, so here is what isnon-posix:  utmp.c:  Contains the most machine specific code.  The only function it 	   exports is setlogin, which is used to update the /etc/utmp file 	   used by the getlogin library call and the who program (finger) and 	   the like.  You can delete the call to setlogin in netlogind.c if 	   this file causes problems.   tty.c:  the constant ONLCR is needed to set the tty into the right "cooked"	   state for the remote shell.  This shouln't be a problem, but you	   may need to play around with the #define _POSIX_SOURCE and the 	   include file order.  The rest is completly POSIX!  Amazing!The files "txfr.c", "socket.c", "pty.c" all will have BSD-style calls there.The reason is that POSIX doesn't have these OS calls required for networking.  txfr.c:  Makes extensive use of select.  There are comments in the file if	   you find the data gets constipated or the program aborts with	   read or write failure.socket.c:  Contains all the BSD socket style calls.  Should work on any BSD	   style networking system.pty.c:	   It appears that pty's should work on both BSD and system V.  This	   code shouldn't cause any problems.Anything else should port straight away.  If you have problems, the code hasbeen designed to be easily debuggable.  If you set the run-time option "-d",the program will not do a fork when the "accept" socket call completes.  Thisshould allow you to examine almost anythnig you wish.  Typically the "-l"and "-p" and "-f" options are very helpful here.  You don't have to run theprogram as root.If you are using gcc on the decstations or sparcs:The decstations have a problem compiling psignal.c with gcc.  Use the deccompiler.The sun sparc machines define the memcmp stuff in <memory.h>.  This is non-standard.  I discovered this only when compiling with gcc -Wall.  Thesun compiler silently compiles everything fine.Both machines report a lot of implicitly defined functions.  I don't knowwhy the headers for gcc can't do this.  Let me know if you find a fix.Dectecting Close on Slave Side of Pty (for netlogind):We need a way to tell from the master side, if the slave sideof the pty has been closed.  The BSD pty man page doesn't say.  The HP-UX man pages states "...exceptional condition refers to an open(2), close(2), or ioctl(2) request pending on the slave side...".   But, this only will occurif TIOCTRAP is enabled on the master pty pty(7).  HP's pty TIOCTRAP is an hp-only feature.  No such features exist on BSD, although it may be thatsetting the baudrate on the slave side to B0 will cause the master to seeit--I can't count on this because the shell doesn't appear to do this onexit.  Thus, SIGCHLD will have to be used.  Note that System V's SIGCLD is NOT the same as POSIX's SIGCHLD.One problem is that SIGCHLD isn't triggered in POSIX if sysconf(_SC_JOB_CONTROL)is zero.  The select statement in netlogind will not abort if the child shelldies and SIGCHLD is not caught.  The solution appears to be just to assumethat System V is being used if job control is not defined, and that SIGCLD(sic)will then be triggered.  Note that SIGCHLD will still be defined, it just neednot be triggered when a used on a non-job control system.  Thus, for systemV, there appears to be no way to force a select on the master side of a ptyto detect a close on the slave side.  As for daemons causing zombie processes,it appears to be impossible to stop on a POSIX system with no job control, butit CAN be solved on a System V system without job-control by setting SIGCLDto SIG_IGN before forking.Athother $64,000 question is can select ensure that no blocks will occur for read and write to sockets and ptys.  Four independent questions must be answered: read/tty, read/sock, write/tty, write/sock for *blocking* descriptors!  The answer to all questions is YES for non-blocking descriptors.Does a write block if there isn't enough room in a blocking fd?  The answer is apparently yes, but no implication is made about atomic writes except for send(2) implies that atomic writes are used for it.  The result?  Use FNDELAY and on BSD select I/O (or O_NONBLOCK on POSIX).There is a "solution" to the above.  Attempt to use POSIX semantics of O_NONBLOCK with select.  POSIX states that writes are atomic if smallerthan PIPE_BUF.  For larger sizes, write may return a partial write, or -1 errno EAGAIN.  This is another serious problem.  If it happens, then selectfor write will immediately return true and the write will continue to returnEAGAIN until the buffer flushes to a small enough value to succeeed.  Wewill be sucking the CPU dry on systems which do this.  The only "solution"is to have the select "poll" by inserting a delay (say 100ms) after thewrite returns eagain.  The idea would be to insert a select for all eventsexcept the one which returned EAGAIN with a 100ms delay, which would beinvoked wwhen EAGAIN occurred.  After that select finished, just return tothe main select loop.  This would still allow other events to be processedimmediately, and would limit the CPU interrupts to 10 / sec at the cost ofadding upto a 100ms propagation delay into the write for that descriptor.I have chosen to assume that EAGAIN will never happen, and let the programabort if it does.  That way, if this code is ported to a machine which hasthe above "feature", you will find out real quickly and can implement theabove "solution".Another problem has to do with SOCK_STREAM sockets.  Is there a propagationdelay for keystrokes sent for example?  TCP_NODELAY documented in TCP(4P)talks about his.Here is the related information from BSD:   - read calls return as much data as possible [PS1:6-25]   - nonblocking io (FNDELAY) applies ONLY to ttys and sockets [fcntl(2)-2]   - Non-blocking sockets and tty fd's are created with the FNDELAY fcntl flag.     [PS1:8-25] [tty(4)-2]   - Writes to non-blocking sockets or to a terminal will write as much as      possible.  If no bytes are writable, EWOULDBLOCK is returned.      [PS1:8-25] [PS1:6-19]   - A recv from a non-blocking socket will return EWOULDBLOCK if no input      is available.  [recv(2)-1]   - Reads to a non-blocking control terminal return EWOULDBLOCK if no input     is available.  Partial reads will succeed return the number of bytes      available [tty(4)-2] [PS1:6-19].      - Select returns true when an input or output may be achieved without     blocking. [PS1:6-19]      - an accept will block unless non-blocking io is enabled.  [PS1:6-34]PS1:8-25:5.2 Non-blocking Sockets    fcntl(sock, F_SETFL, FNDELAY)   accept connect send recv read write, all will return -1 and EWOULDBLOCK.   "If an operation such as send cannot be done in its entirety, but partial   writes are sensible (for example, when using a stream socket), the data   that can be sent immediately will be processed, and the return amount will   indicate the amount actually sent."PS1:6-13:  Signals   A process can request notification via a SIGIO signal when input or output   is possible on a descriptor, or when a non-blocking operation completes.PS1:6-19:  Select   - A descriptor selects for input in an input oriented operation such as      read or receive is possible, or if a connection request may be accepted     (see section 2.3.1.4)     (2.3.1.4) Accepting Connections: ...the [accept] call will wait unless     non-blocking I/O has been enabled.        - A descriptor selects for output in an output oriented operation such as     write or send is possible, or if an operation that was "in progress",     such as connection establishment, has completed (see section 2.1.3).     (2.1.3): A process that wishes to do non-blocking operations on one of its     descriptors sets the descriptor in a non-blocking mode as descripbed in     section 1.5.4.  Thereafter, the read call will return a specific     EWOULDBLOCK error indication if there is no data to be read.  The process     may select the associated descriptor to determine when a read is possible.     Output attempted when a descriptor can accept less than is requested wil     either accept some of the provided data, returning a shorter than normal     length, or return an error indicating that the operation would block.     More output can be performed as soon as a select call indicates the object     is writable.     Operations other than data input or output may be performed on a     descriptor in a non-blocking fashion.  These operations will return with a     characteristic error indicating that they are in progress if they cannot     complete immediately.  The descriptor may then be serected for wwrite to     find out when the operatin has been completed.  When select indicates the     descriptor is writable, the operation has completed.  Depending on the     nature of the descriptor and the operation, additional activity may be     started or the new state may be tested.   - A descriptor selects for an exceptional condition if a condition that     would cause a SIGURG signal to be generated exists (see section 1.3.2),     or other device-specific events have occurred.   Operations on non-blocking descriptors will either complete immediately,   note an error EWOULDBLOCK, partially complete an input or output operation   returning a partial count, or return an error EINPROGRESS noting that the    requested operation is in progress. A descriptor which has signalling    enabled will cause the specified process and/or process group to be   signalled, with a SIGIO for input, output, or in-progress operation   complete, or a SIGURG for exceptional conditions.     For example, when writing to a terminal using non-blocking output, the   system will accept only as much data as there is buffer space for and   return; when making a connection on a socket, the operation may return   indicating that the connection establishment is "in progress".  The   select facility can be used to determine when further output is possible on   the terminal, or when the connection establishment attempt is complete.recv(2)-1:   "The select(2) call may be used to determine when more data arrives."write(2)-1:   When using non-blocking I/O on objects such as sockets that are subject to   flow control, write and writev may write fewer bytes than requested.fcntl(2)-1:   FNDELAY Non-blocking I/O: if no data is available to a read call, or if a   write operation would block, the call returns -1 with the error EWOULDBLOCK.fcntl(2)-2:   BUGS: The asychronous I/O facilities of FNDELAY and FASYNC are currently   available only for tty and socket operations.--- 27-Jun-94 ---Received man pages and include files for attempt to port to UNICOS onthe Cray, and Solaris OS and IRIX. IRIX and Solaris can't deal with ut_host in utmp.c.IRIX and UNICOS can't open the pty: "no pty's available".Solaris reports: could not acquire fd 0 (/dev/ttyp0) as controlling terminal--Inappropriate ioctl for device"

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩视频不卡| 日韩三级精品电影久久久| 欧美又粗又大又爽| 日韩av在线发布| 中文字幕一区三区| 精品国产制服丝袜高跟| 在线观看一区不卡| 成人av动漫网站| 久久99热国产| 日韩不卡免费视频| 亚洲欧美日韩中文字幕一区二区三区| 日韩欧美你懂的| 欧美日韩国产综合视频在线观看| 风间由美一区二区三区在线观看| 久久aⅴ国产欧美74aaa| 午夜精品福利久久久| 亚洲品质自拍视频| 欧美国产精品久久| 久久综合国产精品| 日韩午夜在线观看| 欧美一级免费大片| 91精品国产综合久久久蜜臀粉嫩 | 国产精品久久毛片a| 欧美一级生活片| 欧美日韩另类国产亚洲欧美一级| 91丨九色丨黑人外教| 成人毛片视频在线观看| 国产剧情一区在线| 国精产品一区一区三区mba视频| 日本欧美在线观看| 奇米一区二区三区av| 日韩精品亚洲专区| 日韩成人av影视| 日韩精品成人一区二区在线| 亚洲第一主播视频| 香蕉成人啪国产精品视频综合网| 一区二区三区视频在线观看| 亚洲六月丁香色婷婷综合久久 | 亚洲精品第一国产综合野| 中文字幕乱码日本亚洲一区二区| 久久久精品免费观看| 久久网站热最新地址| 久久精品视频一区二区| 国产蜜臀av在线一区二区三区| 欧美极品aⅴ影院| 国产精品乱码一区二区三区软件 | 欧美激情自拍偷拍| 欧美激情一区不卡| 中文av一区二区| 1024成人网色www| 亚洲欧美一区二区久久| 一区二区高清视频在线观看| 亚洲综合激情另类小说区| 一区二区三区精品在线| 香蕉av福利精品导航| 久久精品国产亚洲a| 国产精品99久久久久久似苏梦涵| 成人综合婷婷国产精品久久免费| 97久久久精品综合88久久| 色欲综合视频天天天| 欧美日韩美少妇| 精品久久久网站| 中文字幕的久久| 一区二区日韩av| 无码av免费一区二区三区试看| 美女mm1313爽爽久久久蜜臀| 国产成人一级电影| 91久久国产综合久久| 91精品国产麻豆| 国产亚洲综合在线| 91性感美女视频| 欧美日韩高清不卡| 精品国产精品一区二区夜夜嗨| 国产精品久久福利| 香蕉加勒比综合久久| 国产高清在线观看免费不卡| 91国在线观看| 精品少妇一区二区三区在线视频| 国产精品国产三级国产专播品爱网 | 久久精品网站免费观看| 日韩美女啊v在线免费观看| 午夜电影网亚洲视频| 国产精品影视网| 欧美系列在线观看| 久久婷婷国产综合精品青草| 亚洲精品va在线观看| 极品少妇一区二区| 欧美午夜在线一二页| 久久久国产精品不卡| 午夜日韩在线电影| 成人综合婷婷国产精品久久蜜臀| 欧美日本不卡视频| 国产精品久久久久久久久搜平片| 日韩高清欧美激情| 91丨九色丨黑人外教| 久久五月婷婷丁香社区| 午夜精品一区二区三区电影天堂| 高清在线观看日韩| 欧美一区二区免费| 亚洲精品国产品国语在线app| 国产在线视频一区二区| 欧美日韩国产欧美日美国产精品| 国产亚洲一区二区三区四区| 视频在线观看一区| 91看片淫黄大片一级| 国产视频一区不卡| 蜜桃久久久久久久| 欧美午夜精品久久久| 国产精品午夜电影| 国模一区二区三区白浆| 在线播放国产精品二区一二区四区| 中文字幕一区在线观看| 国产精品综合网| 日本成人在线视频网站| 一本一道综合狠狠老| 日本一区二区三区在线不卡| 狠狠色丁香婷综合久久| 欧美一级艳片视频免费观看| 亚洲一区二区三区小说| 99热精品国产| 国产精品乱人伦一区二区| 国产成人精品三级| www国产成人免费观看视频 深夜成人网| 日韩一区精品字幕| 欧美精品第1页| 天堂va蜜桃一区二区三区漫画版| 在线一区二区三区四区五区 | 国产精品毛片无遮挡高清| 国产精品88av| 国产日韩欧美综合在线| 极品美女销魂一区二区三区免费| 日韩视频免费观看高清在线视频| 日韩国产欧美视频| 91精品国产乱码久久蜜臀| 日韩精品一卡二卡三卡四卡无卡| 欧美性视频一区二区三区| 夜夜精品浪潮av一区二区三区| 日本高清无吗v一区| 一区二区三区四区不卡在线| 欧美色图在线观看| 亚洲 欧美综合在线网络| 欧美精品免费视频| 久久精品99久久久| 久久亚洲私人国产精品va媚药| 韩国精品主播一区二区在线观看| 国产亚洲女人久久久久毛片| 成人一区二区三区视频| 久久精品人人爽人人爽| 顶级嫩模精品视频在线看| 亚洲欧洲美洲综合色网| 色综合天天综合给合国产| 曰韩精品一区二区| 欧美体内she精视频| 日韩电影在线免费看| 日韩一区二区三区精品视频| 久久成人精品无人区| 国产三区在线成人av| 91香蕉国产在线观看软件| 亚洲丝袜自拍清纯另类| 欧美色精品在线视频| 久久综合综合久久综合| 国产婷婷一区二区| 91老司机福利 在线| 亚洲成av人片观看| 2019国产精品| 91视频免费看| 日本不卡123| 国产精品狼人久久影院观看方式| 色综合天天天天做夜夜夜夜做| 五月婷婷激情综合网| 欧美成人猛片aaaaaaa| www.亚洲人| 丝袜国产日韩另类美女| 久久久久综合网| 色88888久久久久久影院按摩 | 一区二区三区在线免费视频| 亚洲美腿欧美偷拍| 欧美一区二区三区四区高清| 国产成a人亚洲精| 亚洲444eee在线观看| 国产亚洲美州欧州综合国| 欧美性xxxxxx少妇| 国产成人av电影在线| 婷婷中文字幕一区三区| 欧美激情一区二区三区四区| 欧美美女直播网站| 成人av午夜电影| 日本不卡高清视频| 亚洲人成人一区二区在线观看| 日韩一区二区电影网| 91免费视频网址| 激情久久久久久久久久久久久久久久| 亚洲人精品一区| 久久中文娱乐网| 欧美日韩国产综合一区二区三区 | 制服丝袜一区二区三区| 丰满放荡岳乱妇91ww| 蜜桃久久精品一区二区| 亚洲欧美偷拍另类a∨色屁股| 久久精品免费在线观看|