]> mj.ucw.cz Git - libucw.git/blobdiff - lib/proctitle.c
Merge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git
[libucw.git] / lib / proctitle.c
index ec65012fbeebb36706cbc385d7d6e491f5493d38..f605aef18b7b4b9f5aa3cd3fa29b02b0e9a81cce 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     UCW Library -- Setting of Process Title
  *
- *     (c) 2001 Martin Mares <mj@ucw.cz>
+ *     (c) 2001--2006 Martin Mares <mj@ucw.cz>
  *
  *     This software may be freely distributed and used according to the terms
  *     of the GNU Lesser General Public License.
@@ -20,7 +20,7 @@ static char *spt_start, *spt_end;
 void
 setproctitle_init(int argc, char **argv)
 {
-#ifdef linux
+#ifdef CONFIG_LINUX
   int i, len;
   char **env, **oldenv, *t;
 
@@ -74,3 +74,9 @@ setproctitle(char *msg, ...)
     }
   va_end(args);
 }
+
+char *
+getproctitle(void)
+{
+  return (spt_start < spt_end) ? spt_start : NULL;
+}