Ticket UUID: | 1077242 | |||
Title: | make [info hostname] a PGV | |||
Type: | RFE | Version: | None | |
Submitter: | dgp | Created on: | 2004-12-02 01:34:57 | |
Subsystem: | 27. Channel Types | Assigned To: | dgp | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2005-07-14 03:00:55 | |
Resolution: | Accepted | Closed By: | dgp | |
Closed on: | 2005-07-13 20:00:55 | |||
Description: |
see summary. | |||
User Comments: |
dgp added on 2005-07-14 03:00:55:
Logged In: YES user_id=80530 commit to HEAD kennykb added on 2005-07-10 09:54:48: File Added - 141484: 1077242a,patch kennykb added on 2005-07-10 09:54:45: Logged In: YES user_id=99768 Patch worked OK on Win2k (gcc and vc6, with and without threads) once I changed a spurious '^L' (literally, caret-ell) to a form feed character. Revised patch attached. dgp added on 2005-07-09 11:28:28: File Deleted - 141342: File Added - 141397: 1077242.patch dgp added on 2005-07-09 11:28:26: Logged In: YES user_id=80530 Revised patch includes changes for windows as well; needs testing and review there. dgp added on 2005-07-08 23:44:50: File Added - 141342: 1077242.patch dgp added on 2005-07-08 23:44:48: Logged In: YES user_id=80530 Attached patch does the [info hostname] conversion for unix. dkf added on 2004-12-03 16:24:22: Logged In: YES user_id=79902 All modern platforms I know of have an OS notion of current user and that is per-process. (The exception is Win95/98/ME but who really cares about those any more?) If nothing else, could use a PGV to store the initial value of t_p(user), as I don't think that there's a (UNIX) cross-platform reentrant interface to convert the UID to a username. dgp added on 2004-12-03 03:06:27: Logged In: YES user_id=80530 hmmm... currently tcl_platform(user) is pulled from the environment variable at the time each interp is created. This allows each interp to have different values if they get created in different environments. A PGV-backed store would force the same value on all interps in all threads. Not clear to me which is more desirable. dkf added on 2004-12-02 16:32:18: Logged In: YES user_id=79902 Also tcl_platform(user)? |