From: Martin Mares Date: Sun, 29 Jan 2006 20:31:50 +0000 (+0000) Subject: Added getproctitle(). X-Git-Tag: holmes-import~684 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=6b6c91f382dd2fa21e378e86c4d22aab0f7d2299;p=libucw.git Added getproctitle(). --- 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; +}