Tcl Source Code

View Ticket
Login
Ticket UUID: 920731
Title: TIP #178: [info pid] and [info tid]
Type: Support Version: None
Submitter: mistachkin Created on: 2004-03-22 02:04:18
Subsystem: None Assigned To: dkf
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2009-07-29 19:59:00
Resolution: Closed By: dkf
    Closed on: 2008-12-11 15:23:42
Description:
Please refer to TIP #178.
User Comments: dkf added on 2009-07-29 19:59:00:

IP - Comment Removed: 130.88.1.31

dkf added on 2009-07-29 19:58:57:

IP - Comment Removed: 130.88.1.31

dkf added on 2009-07-29 19:58:55:

IP - Comment Removed: 130.88.1.31

dkf added on 2009-07-29 19:58:50:

IP - Comment Removed: 130.88.1.31

dkf added on 2009-07-29 19:58:47:

IP - Comment Removed: 130.88.1.31

dkf added on 2009-07-29 19:58:41:

IP - Comment Removed: 130.88.1.31

dkf added on 2008-12-11 22:23:42:

data_type - 210894

jenglish added on 2008-04-21 12:24:04:
Logged In: YES 
user_id=68433
Originator: NO

The InfoTidCmd() implementation is busted for POSIX systems:

    sprintf(buf, "%lu", (unsigned long) Tcl_GetCurrentThread());

On Unix, Tcl_GetCurrentThread() is the same as pthread_self(), which returns a pthread_t.  This is an opaque data type; not necessarily an unsigned long, or even convertible to an unsigned long.  On some implementations a pthread_t is a pointer to an opaque structure, and is only valid in the context of the process containing the thread.

patthoyts added on 2008-04-21 05:15:47:

File Added - 275281: tip178-20080420.patch

Logged In: YES 
user_id=202636
Originator: NO

I updated the patch for the 8.6 HEAD now that the info command is an ensemble it hooks in differently.
File Added: tip178-20080420.patch

mistachkin added on 2004-07-09 08:44:33:

File Added - 93308: tip178.zip

Logged In: YES 
user_id=113501


Apparently, SF likes to randomly lose attachments?

Here is the reference implementation.

Attachments: