.
D 2000-10-26T01:01:05
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s681\sBug\nVersion:\s8.0p2\nSubmitDate:\s'1998-09-23'\nLastModified:\s'1999-11-05'\nSeverity:\sMED\nStatus:\sReleased\nSubmitter:\swelch\nChangedBy:\shobbs\nOS:\sAll\nOSVersion:\sNA\nMachine:\sNA\nFixedDate:\s'1999-11-05'\nFixedInVersion:\s8.3b1\nClosedDate:\s'2000-10-25'\n\n\nAccording\sto\sopen(3tcl):\n\s\s\s\s\s\s\sa\s\s\s\s\s\s\s\s\s\s\s\s\s\sOpen\s\sthe\s\sfile\sfor\swriting\sonly.\s\sThe\sfile\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\smust\salready\sexist,\sand\sthe\sfile\s\sis\s\sposi=AD\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\stioned\s\sso\sthat\snew\sdata\sis\sappended\sto\sthe\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sfile.\n\nThe\ssemantics\sof\sthis\sare\sunclear\sfrom\sthis\sdocumentation,\sbut\sI\ncontend\sthat\sthey\sshould\sbe\sthe\ssame\sas\sthose\sof\sANSI\sC\s"a",\swhich\sare\nto\sposition\sthe\sfile\spointer\sat\sthe\send\sof\sthe\sfile\sprior\sto\seach\nwrite.\n\nOtherwise,\sprograms\swhich\swant\sthis\s(correct)\sbehaviour\swill\sall\shave\nto\suse\sthe\sPOSIX-derived\s{...\sAPPEND\s...}\ssyntax.\n\n(This\sbug/misfeature\salso\sexists\sin\smy\sprivate\sdebianisation\sof\nupstream\s8.1a2.)\n\nIan.\n\n-anarres:~/junk>\scat\st.tcl\nforeach\s{fn\smode}\s{t\sa\s\su\s{WRONLY\sAPPEND\sCREAT}}\s{\n\s\s\s\sputs\s"testing\s$fn\swith\smode\s$mode"\n\s\s\s\sfile\sdelete\s-force\s$fn\n\s\s\s\sset\sf1\s[open\s$fn\s$mode]\n\s\s\s\sset\sf2\s[open\s$fn\s$mode]\n\s\s\s\sfconfigure\s$f1\s-buffering\snone\n\s\s\s\sfconfigure\s$f2\s-buffering\snone\n\s\s\s\sputs\s$f2\s"data\sf2"\n\s\s\s\sputs\s$f1\s"DATA\sWRITTEN\sWITH\sF1"\n\s\s\s\sputs\s$f2\s"more\sf2"\n\s\s\s\sclose\s$f1\n\s\s\s\sclose\s$f2\n}\n-anarres:~/junk>\srm\s-f\st.strace;\sstrace\s-ot.strace\stclsh8.0\st.tcl\ntesting\st\swith\smode\sa\ntesting\su\swith\smode\sWRONLY\sAPPEND\sCREAT\n-anarres:~/junk>\scat\st\nDATA\sWRImore\sf2\nH\sF1\n-anarres:~/junk>\scat\su\ndata\sf2\nDATA\sWRITTEN\sWITH\sF1\nmore\sf2\n-anarres:~/junk>\sdpkg\s-S\s`type\s-p\stclsh8.0`\ntcl8.0:\s/usr/bin/tclsh8.0\n-anarres:~/junk>\sdpkg\s-s\stcl8.0\nPackage:\stcl8.0\nStatus:\sinstall\sok\sinstalled\nPriority:\soptional\nSection:\slibs\nInstalled-Size:\s641\nMaintainer:\sDavid\sEngel\s<[email protected]>\nVersion:\s8.0p2-3\nProvides:\stclsh\nDepends:\slibc6,\slibreadlineg2\s(>=3D\s2.1-4),\sncurses3.4,\stcl8.0\nConflicts:\stcl,\stcl74\s(<=3D\s7.4p3-2)\nDescription:\sThe\sTool\sCommand\sLanguage\s(TCL)\sv8.0\s-\sRun-Time\sPackage.\n\sTCL\sis\sa\spowerful,\seasy\sto\suse,\sinterpreted\sscripting\slanguage.\n\n\nThe\sonly\sproblem\shere\sis\sthe\sbug\sin\sthe\sdocs\sfor\s"a",\sin\sthat\nwe\sshould\s(and\sdo)\sfollow\sPOSIX\sfopen,\swhere\s"a"\sdoesn't\scare\nwhether\sthe\sfile\sexists\sor\snot.\s\sHowever,\sthere\sis\sa\sstandard\ndifference\sbetween\s"a"\sand\s"APPEND",\sin\sthat\sAPPEND\smoves\sto\nthe\send\sof\sthe\sfile\son\sEACH\swrite,\swhile\s"a"\sonly\ssets\sthe\nINITIAL\spostion\sto\sthe\send.\s\n--\s11/05/1999\shobbs
J foundin obsolete:\s8.0p2
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 37.\sFile\sSystem
J title Append\smode\s"a"\sdoes\snot\sagree\swith\sAPPEND\smode
J type Bug
K 218481ffffffffffffffffffffffffffffffffff
U nobody
Z 79522b1c165c55f3a1bde3e8ac35dca1