Sys-Proctitle
view release on metacpan or search on metacpan
libsetproctitle/setproctitle.c view on Meta::CPAN
} else return 0;
if( !eob ) return 0;
if( environ==envp ) {
# if DEBUG==1
fprintf( stderr, "environ=%p\n", environ );
# endif
/* this is the hard way of copying the environment but it */
/* makes glibc's getenv/putenv/setenv/... happy */
clearenv();
for( i=0; envp[i]; i++ ) {
char *cp=strchr( envp[i], '=' );
if( cp ) {
*cp++='\0';
setenv( envp[i], cp, 1 );
}
}
# if DEBUG==1
fprintf( stderr, "new environ=%p\n", environ );
# endif
}
if( __progname_full ) {
char *title_progname_full=strdup( __progname_full );
# if DEBUG==1
( run in 0.433 second using v1.01-cache-2.11-cpan-283623ac599 )