X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fproctitle.c;h=4e1541847b81bbd3ee75250622e073aaba544367;hb=69808c861b8df0745bd0bc93793f558e0055da7e;hp=ec65012fbeebb36706cbc385d7d6e491f5493d38;hpb=cad27e97e6370f96903d42aaf345c099af0a03bd;p=libucw.git diff --git a/lib/proctitle.c b/lib/proctitle.c index ec65012f..4e154184 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. @@ -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; @@ -54,7 +54,7 @@ setproctitle_init(int argc, char **argv) } void -setproctitle(char *msg, ...) +setproctitle(const char *msg, ...) { va_list args; byte buf[256]; @@ -74,3 +74,9 @@ setproctitle(char *msg, ...) } va_end(args); } + +char * +getproctitle(void) +{ + return (spt_start < spt_end) ? spt_start : NULL; +}