]> mj.ucw.cz Git - libucw.git/commitdiff
Added getproctitle().
authorMartin Mares <mj@ucw.cz>
Sun, 29 Jan 2006 20:31:50 +0000 (20:31 +0000)
committerMartin Mares <mj@ucw.cz>
Sun, 29 Jan 2006 20:31:50 +0000 (20:31 +0000)
lib/lib.h
lib/proctitle.c

index a0f6788a58661d30bdf7d020dc78064cc1d5f325..614b88c8e5d14cfb5d84e39476330bdd68ccbb2f 100644 (file)
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -208,6 +208,7 @@ void munmap_file(void *start, unsigned len);
 
 void setproctitle_init(int argc, char **argv);
 void setproctitle(char *msg, ...) FORMAT_CHECK(printf,1,2);
+char *getproctitle(void);
 
 /* randomkey.c */
 
index ec65012fbeebb36706cbc385d7d6e491f5493d38..e364fc4b015bcdd33f7c6c1449fb4eca7bed5b85 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.
@@ -74,3 +74,9 @@ setproctitle(char *msg, ...)
     }
   va_end(args);
 }
+
+char *
+getproctitle(void)
+{
+  return (spt_start < spt_end) ? spt_start : NULL;
+}