From 6b6c91f382dd2fa21e378e86c4d22aab0f7d2299 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 29 Jan 2006 20:31:50 +0000 Subject: [PATCH] Added getproctitle(). --- lib/lib.h | 1 + lib/proctitle.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/lib.h b/lib/lib.h index a0f6788a..614b88c8 100644 --- 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 */ diff --git a/lib/proctitle.c b/lib/proctitle.c index ec65012f..e364fc4b 100644 --- a/lib/proctitle.c +++ b/lib/proctitle.c @@ -1,7 +1,7 @@ /* * UCW Library -- Setting of Process Title * - * (c) 2001 Martin Mares + * (c) 2001--2006 Martin Mares * * 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; +} -- 2.39.2