extra pipes opened with exec
Closed / Fixed05382a5317cf938117548b5b76fc9ed5a003b25dCreated 11 years agoUpdated 42 days ago
Descriptionplain2015-12-09 13:46:25
#!/usr/bin/tclsh
if {$::argv > 0} {
incr ::argv -1
exec $::argv0 $::argv &
exit 0
}
vwait forever
-- snip --
run the snippet as 'foo.tcl <number>' then check the open fds with 'ls -l /proc/<pid>/fd/'
argv = 1 gives 4 pipes
argv = 5 gives 12 pipes
etc
bug is present on tcl 8.5.9
bug is (apparently) not present on tcl 8.6.1. always 2 pipes, regardless of iterations
serhiy.storchakawiki2026-10-21 10:03:38
Fixed in 8.5.13 by [662a69f571] (backport of [5a5e87fae7], in 8.6.0): the notifier's internal pipes are now close-on-exec, so exec'd children no longer inherit them.
serhiy.storchaka Ticket [05382a5317]: 3 changes
[History diff]2026-10-22 17:19:31
Log in (anonymous is fine) to add a comment.