Fix bug #813087, "tclsh treats Unix pipelines as sockets"
Closed / Accepted813606ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 23 years ago
Descriptionplain2003-09-27 16:30:51
Darwin/Mac OS X (and probably NetBSD) implement pipes as local sockets. That makes tclUnixChan.c:Tcl_MakeFileChannel() detect pipes as sockets, which in turn makes pipes have the wrong default options. This patch is based on <http://groups.google.com/groups?selm=20010327154747.A13991%40vaasje.org>. It replaces getsockopt(SO_TYPE) with getsockname().
cc_bennyplain2003-09-27 23:30:51
File Added - 62720: tclUnixChan.c.patch
cc_bennyplain2003-09-27 23:34:35
Logged In: YES user_id=143885 I forgot to add: I have tested that this patch doesn't detect pipes as sockets on Mac OS X and Linux. I have not actually tested if it detects real sockets right.
andreas_kupriesplain2003-10-24 01:01:48
Logged In: YES user_id=75003 Accepted with small changes: - sockaddr_storage changed to sockaddr - ss_family changed to sa_family - Changed the condition according to J. English's comments in the bug report. Committed to both head and core-8-4-branch.
Log in (anonymous is fine) to add a comment.
Attachments:
- tclUnixChan.c.patch [download] added by cc_benny on 2003-09-27 23:30:51. [details]