.
D 2001-04-10T12:38:11
J assignee nobody
J cmimetype text/plain
J comment Hi\sall,\n\nI\shave\sbeen\strying\sto\suse\sthe\stclsh8.1_r\son\sa\sFreeBSD\nhost\s(it\swas\sthe\sonly\savailable\sprecompiled\spackage,\nbut\sI\salso\shad\sthe\scase\swith\sTcl\s8.0\sand\sTcl\s8.3.2\ncompiled).\n\nOk,\sso\shere\sis\sthe\sproblem\s:\n\n%\sexec\sls\nerror\sreading\soutput\sfrom\scommand:\sinterrupted\ssystem\ncall\n%\n\nWhen\sI\slink\stclsh\swith\slibc.so\srather\sthan\slibc_r.so\n(the\smulti-threaded\sc\slibrary),\sthere\sis\sno\sproblem,\nbut\sif\sI\slink\swith\sthe\slibc_r.so,\sI\soften\shave\sthe\nabove\soutput\s(I\ssay\soften,\sbecause\sit\salso\ssometimes\nwork\s...)\n\nI\swent\sinto\sthe\scode\s(and\sI\shad\sto\ssay\sit\swas\stough\nwith\sGDB\s-\sseems\sto\shave\sproblem\swith\smulti-threaded\napplications\son\sFreeBSD),\sand\sit\sseems\sto\sbe\scoming\nfrom\sthe\sunix/tclUnixPipe.c\sfile.\n\nIn\sthe\sPipeInputProc\s(),\sI\sreplaced\s:\n\n------------\n\n\s\s\s\sbytesRead\s=\sread(GetFd(psPtr->inFile),\sbuf,\n(size_t)\stoRead);\n\s\s\s\sif\s(bytesRead\s>\s-1)\s{\n\s\s\s\s\s\s\s\sreturn\sbytesRead;\n\s\s\s\s}\n\s\s\s\s*errorCodePtr\s=\serrno;\n\s\s\s\sreturn\s-1;\n\n------------\n\nwith\n\n------------\n\n\s\s\s\sdo\n{\nbytesRead\s=\sread(GetFd(psPtr->inFile),\sbuf,\s(size_t)\ntoRead);\n}\swhile\s((bytesRead\s<\s0)\s&&\s(errno\s==\sEINTR));\n\n\s\s\s\sif\s(bytesRead\s<\s0)\n{\n*errorCodePtr\s=\serrno;\nreturn\s(-1);\n}\n\s\s\s\selse\n{\nreturn\s(bytesRead);\n}\n-------------\n\nIt\sseems\sthat\sthe\sSUN\sRPCs\salso\suse\sthat\strick\s(in\nclnt_udp.c).\sAfter\sapplying\sthat\spatch,\sit\sseems\sall\nright.\n\nShall\sI\scommit\ssomewhere\sfor\sthat\spatch\sto\sbe\nintegrated\s(if\sagreed)\sin\snext\sreleases\s?\n\nHope\sthis\shelps\n\nDERF
J foundin None
J priority 5\sMedium
J resolution None
J status Open
J submitter mad_derf
J subsystem 49.\sThreading
J title multithreaded\stclsh\sexec\sfails\s(FreeBSD)
J type Bug
K 415131ffffffffffffffffffffffffffffffffff
U mad_derf
Z 62aae605834e27173cf38f9e8fcc3ba9