.
D 2005-09-28T09:32:09
J assignee andreas_kupries
J cmimetype text/plain
J comment When\sa\sprocess\sis\sforked\sand\sif\ssocket\sis\sexecuted\nwithin\sthe\schild\sprocess\sthe\ssocket\sis\snot\saccepting\nthe\sincoming\sconnection.\n\nTcl\sversion:\s8.4.11\nPlatform:\sLinux\n\nTcl\sVersion\sis\scompiled\swith\sthreading\senabled.\sThe\nfollowing\sis\sthe\ssample\sserver\s(daytime\sserver)\sprogram\nto\sreproduce\sthe\sproblem,\n\nproc\sServer\s{channel\sclientaddr\sclientport}\s{\n\s\s\sputs\s"Connection\sfrom\s$clientaddr\sregistered"\n\s\s\sputs\s$channel\s[clock\sformat\s[clock\sseconds]]\n\s\s\ssleep\s30\n\s\s\sclose\s$channel\n}\n\nif\s{\s[fork]\s}\s{\n\s\s\s\s\s\s\s#\sParent\n\s\s\s\s\s\s\s\swait\n\s\s\s\s\s\s\s\sexit\n}\selse\s{\n\s\s\s\s\s\s\s#\schild\n\s\s\s\s\s\s\s\ssocket\s-server\sServer\s9900\n\s\s\s\s\s\s\s\sputs\s"child\swaiting\sfor\ssockets"\n\s\s\s\s\s\s\s\svwait\sforever\n}\n\nThe\scorresponding\sclient\sprogram,\n\nset\sserver\slocalhost\nset\ssockChan\s[socket\s$server\s9900]\ngets\s$sockChan\sline\nclose\s$sockChan\nputs\s"The\stime\son\s$server\sis\s$line"\n\nAfter\sthe\sserver\sis\sstarted\sand\safter\sstarting\sthe\nclient\snetstat\scomman\sgives\sthe\sfollowing\soutput,\n\n[root@myhost\stest]#\snetstat\s-atp\s|\sgrep\s9900\ntcp\s\s\s\s\s\s\s\s0\s\s\s\s\s\s0\s*:9900\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s*:*\s\s\s\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sLISTEN\s\s\s\s\s\s4309/tcl\ntcp\s\s\s\s\s\s\s\s0\s\s\s\s\s\s0\smyhost:36222\s\s\s\s\s\s\s\s\s\smyhost:9900\s\n\s\s\s\s\s\s\s\s\sESTABLISHED\s4291/tcl\ntcp\s\s\s\s\s\s\s\s0\s\s\s\s\s\s0\smyhost:9900\s\s\s\s\s\s\s\s\s\s\smyhost:36222\n\s\s\s\s\s\s\s\s\sESTABLISHED\s-\n\nThe\sfirst\sone\sis\sthe\sserver's\slistening\ssocket,\ssecond\nis\sclients\ssocket\sand\sthird\sis\sserver's\sconnected\nsocket.\sAs\syou\scan\ssee\sthe\ssever's\ssocket\sdoesn't\shave\nthe\sapplication\sassociated\swith\sit.
J foundin obsolete:\s8.4.11
J priority 5\sMedium
J resolution None
J status Open
J submitter rbalakri
J subsystem 24.\sChannel\sCommands
J title Sockets\sare\snot\sworking\sin\sthe\schild\sprocesses
J type Bug
K 1306694fffffffffffffffffffffffffffffffff
U rbalakri
Z 867ae9d496bb0d18cc9c2b6975287a94