TclCreatePipeline still alters argv
Closed / Out of Date768664ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 18 years ago
Descriptionplain2003-07-09 18:58:27
Symptom:
A previous bugfix only restored one case
of a modifed argv-entry, but didn't affect
two other modifications of argv:
- pipes ("|" and "|&") are replaced by NULL
- redirections are removed.
This may or may not be a real problem.
dkf Ticket [768664ffff]: 1 change
[History diff]2004-12-13 21:59:46
dgpplain2007-09-05 23:49:23
Logged In: YES user_id=80530 Originator: NO I don't know whether this is still valid. Do you?
andreas_kupriesplain2007-09-06 00:17:25
Logged In: YES user_id=75003 Originator: NO A quick source-dive and check of tclPipe.c shows that the argv argument of TCP is modified by it in 4 places, lines 697, 876, 896, and 899. I am not sure if any of these are a bug. Currently I do not believe so. The base logic seems to be that '|'s are NULLed, and then the relevant parts of argv are used to spawn the subprocess with its arguments. And regarding the redirections, these seem to be processed by the function to point to Tcl channels, so of course they are removed so that the spawned processes do not see them. As they do not have to handle the redirections on their own. I fail to see the problem with that. Or does the submitter simply wants us to operate on a copy of argv (it is declared as 'const char**'), so that the caller of TCP doesn't see alterations ?
dgp Pending ticket [768664ffff].
[History diff]2008-04-15 23:04:49
sf-robotplain2008-04-30 09:20:26
Logged In: YES user_id=1312539 Originator: NO This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).
avl42plain2008-06-14 00:25:12
Logged In: YES user_id=830354 Originator: NO (I'm the original submitter) I vaguely remember that I saw some change committed back then, that was about not changing that argv. With that still in mind, I saw some other places, where the vector argv was still modified. That was my motivation for this bug report. I didn't (and still don't) feel competent enough to judge the case entirely, but I thought it would be good to let the maintainers know, that they might have just forgotten those other places...
Log in (anonymous is fine) to add a comment.