guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cuserid thread safety


From: Kevin Ryde
Subject: cuserid thread safety
Date: Sun, 22 Feb 2004 07:57:44 +1000
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux)

        * posix.c (scm_cuserid): Use a private result buffer, for reentrancy.

--- posix.c.~1.124.~    2004-02-21 09:19:52.000000000 +1000
+++ posix.c     2004-02-22 07:54:37.000000000 +1000
@@ -1498,9 +1498,10 @@
            "information cannot be obtained.")
 #define FUNC_NAME s_scm_cuserid
 {
+  char buf[L_cuserid];
   char * p;
 
-  p = cuserid (NULL);
+  p = cuserid (buf);
   if (!p || !*p)
     return SCM_BOOL_F;
   return scm_makfrom0str (p);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]