.
D 2014-05-22T17:19:46.506
T +comment 72c54e16595a9814039b6e9f6830284eceb1af45 Workarounds\sand\sfixes\sfor\swrapped\sexecutables\son\svarious\splatforms\r\nregarding\sthe\shandling\sof\swrapped\sdynamic\slibraries.\r\n\r\nThe\sbasic\sflow\sof\soperation\sis\sto\scopy\ssuch\slibraries\sinto\sa\stemp\r\nfile,\shand\sthem\sto\sthe\sOS\sloader\sfor\sprocessing,\sand\sthen\sto\sdelete\r\nthem\simmediately,\sto\sprevent\sthem\sfrom\sbeing\saccessible\sto\sother\r\nexecutables.\sOn\splatforms\swhere\sthat\sis\snot\spossible\sthe\slibrary\sis\r\nleft\sin\splace\sand\sthings\sare\sarranged\sto\sdelete\sit\son\sregular\sprocess\r\nexit.\r\n\r\nAn\sexample\sof\sthe\slatter\sare\solder\srevisions\sof\sHPUX\swhich\sreport\sthat\r\nthe\sfile\sis\sbusy\swhen\strying\sto\sdelete\sit.\sYounger\srevisions\sof\sHPUX\r\nhave\schanged\sto\sallow\sthe\sdeletion,\sbut\sare\salso\sbuggy,\sthe\sOS\sloader\r\nmangles\sits\sdata\sstructures\sso\sthat\sa\ssecond\slibrary\sloaded\sin\sthis\r\nmanner\sfails.\r\n\r\nMore\srecently\sit\swas\sfound\sthat\sLinux\swhich\sis\susually\sok\swith\r\ndeleting\sthe\sfile\sand\sgets\severything\sright\sshows\sthe\ssame\strouble\sas\r\nmodern\sHPUX\swhen\sthe\s"docker"\scontainerization\ssystem\sis\sinvolved,\sor\r\nmore\sspecifically\sthe\sAUFS\sin\suse\sthere.\sDeleting\sthe\sloaded\slibrary\r\nfile\smangles\sdata\sstructures\sand\sbreaks\sloading\sof\sthe\sfollowing\r\nlibraries.\sFor\sa\sdemonstration\swhich\sdoes\snot\sinvolve\sTcl\sat\sall\ssee\r\nthe\sticket\r\n\r\n\s\s\s\s\shttps://github.com/dotcloud/docker/issues/1911\r\n\r\nin\sthe\sdocker\stracker.\r\n\r\nThis\sof\scourse\sbreaks\sthe\suse\sof\swrapped\sexecutables\swithin\sdocker\r\ncontainers.\r\n\r\nThis\scommit\sintroduces\sthe\sfunction\sTclSkipUnlink()\swhich\scentralizes\r\nthe\shandling\sof\ssuch\sexceptions\sto\sunlinking\sthe\slibrary\safter\sunload,\r\nand\sprovides\scode\shandling\sthe\sknown\scases.\sIOW\sHPUX\sis\sgenerally\r\nforced\sto\snot\sunlink,\sand\sditto\swhen\swe\sdetect\sthat\sthe\scopied\slibrary\r\nfile\sresides\swithin\san\sAUFS.\r\n\r\nThe\slatter\smust\showever\sbe\sexplicitly\sactivated\sby\ssetting\sthe\sdefine\r\n-DTCL_TEMPLOAD_NO_UNLINK\sduring\sbuild.\sWe\sstill\sneed\sproper\sconfigure\r\ntests\sto\sset\sit\son\sthe\srelevant\splatforms\s(i.e.\sLinux).\r\n\r\nThe\sAUFS\sdetection\sand\shandling\scan\sbe\soverridden\sby\sthe\senvironment\r\nvariable\sTCL_TEMPLOAD_NO_UNLINK\swhich\scan\sforce\sthe\sbehaviour\seither\r\nway\s(skip\sor\snot).\sIn\scase\sthe\suser\sknows\sbest,\sor\swishes\sto\stest\sif\r\nthe\sproblem\swith\sAUFS\shas\sbeen\sfixed.\r\n
U aku
Z 22311937d494f1b8cf1a1ace890baf6f