Skip to content
Tcl Source Code Artifact [a458a28f2b]
Login

Artifact [a458a28f2b]

Artifact a458a28f2b6f7662b675e9a526995d066f6d9fd9d44e8e7f38963d5572e5192c:

Ticket change [a458a28f2b] - Ticket [cd609219f5522f31|cd609219f5] <i>directory creation temporarily changes the umask</i> status still Open with 3 other changes by christian.nassau on 2023-04-06 10:43:17.
D 2023-04-06T10:43:17.233
J icomment Note\sthat\sin\sa\smulti-threaded\sapplication\sthis\scode\scan\sbe\shighly\sproblematic:\sif\stwo\sthreads\ssimultaneously\stry\sto\screate\sa\sdirectory,\sboth\smight\sbe\sstepping\sthrough\sthese\slines\sat\sthe\ssame\stime.\sIf\sit\shappens\sin\sthis\ssequence\sthe\sprocesses'\sumask\swill\send\sup\spermanently\sset\sto\s"0":\r\n<blockquote>\r\n<pre>\r\nthread\s1\s\s\s\s\s\s\s\s\s\s\s|\sthread\s2\r\nmode\s=\sumask(0);\s\s\s|\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s|\smode\s=\sumask(0);\r\numask(mode)\s\s\s\s\s\s\s\s|\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s|\sumask(mode)\r\n</pre>\r\n</blockquote>\r\nIf\sa\smultithreaded\sprocess\sspawns\sa\spool\sof\sthreads\swhich\sall\stry\sto\screate\sthe\ssame\sdirectory\son\sstartup\sthat\smight\snot\sbe\san\sunlikely\scoincidence.
J login christian.nassau
J mimetype text/html
K cd609219f5522f3191a68a84deb51a968dfb8cac
U christian.nassau
Z 781506da72f0f8f3630e5652aaa5d086