make [info hostname] a PGV
Closed / Accepted1077242fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 21 years ago
Descriptionplain2004-12-02 01:34:57
see summary.
dkfplain2004-12-02 16:32:18
Logged In: YES user_id=79902 Also tcl_platform(user)?
dgpplain2004-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.
dkfplain2004-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.
dgpplain2005-07-08 23:44:48
Logged In: YES user_id=80530 Attached patch does the [info hostname] conversion for unix.
dgpplain2005-07-08 23:44:50
File Added - 141342: 1077242.patch
dgpplain2005-07-09 11:28:26
Logged In: YES user_id=80530 Revised patch includes changes for windows as well; needs testing and review there.
dgpplain2005-07-09 11:28:28
File Deleted - 141342: File Added - 141397: 1077242.patch
kennykbplain2005-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.
kennykbplain2005-07-10 09:54:48
File Added - 141484: 1077242a,patch
dgpplain2005-07-14 03:00:55
Logged In: YES user_id=80530 commit to HEAD
Log in (anonymous is fine) to add a comment.
Attachments:
- 1077242a,patch [download] added by kennykb on 2005-07-10 09:54:45. [details]
- 1077242.patch [download] added by dgp on 2005-07-09 11:28:26. [details]