mirror of
https://github.com/proxytunnel/proxytunnel.git
synced 2026-01-23 02:34:59 +00:00
Reworked setproctitle stuff
git-svn-id: https://proxytunnel.svn.sourceforge.net/svnroot/proxytunnel/trunk/proxytunnel@128 bc163920-b10d-0410-b2c5-a5491ca2ceef
This commit is contained in:
parent
f68169d1db
commit
3f829cfd05
2 changed files with 22 additions and 8 deletions
|
|
@ -228,8 +228,10 @@ void do_daemon()
|
|||
signal(SIGCHLD,SIG_IGN);
|
||||
|
||||
#ifdef SETPROCTITLE
|
||||
if( args_info.proctitle_given )
|
||||
setproctitle( "%s [daemon]\0", args_info.proctitle_arg );
|
||||
if( ! args_info.proctitle_given )
|
||||
setproctitle( "[daemon]\0" );
|
||||
else
|
||||
setproctitle( "\0" );
|
||||
#else
|
||||
if( args_info.proctitle_given )
|
||||
message( "Setting process-title is not supported in this build\n");
|
||||
|
|
@ -299,8 +301,10 @@ void do_daemon()
|
|||
do_ssl();
|
||||
#endif
|
||||
#ifdef SETPROCTITLE
|
||||
if( args_info.proctitle_given )
|
||||
setproctitle( "%s [cpio]\0", args_info.proctitle_arg );
|
||||
if( ! args_info.proctitle_given )
|
||||
setproctitle( "[cpio]\0" );
|
||||
else
|
||||
setproctitle( "\0" );
|
||||
#else
|
||||
if( args_info.proctitle_given )
|
||||
message( "Setting process-title is not supported in this build\n");
|
||||
|
|
@ -400,8 +404,10 @@ int main( int argc, char *argv[] )
|
|||
do_ssl();
|
||||
#endif
|
||||
#ifdef SETPROCTITLE
|
||||
if( args_info.proctitle_given )
|
||||
setproctitle( "%s [cpio]\0", args_info.proctitle_arg );
|
||||
if( ! args_info.proctitle_given )
|
||||
setproctitle( "[cpio]\0" );
|
||||
else
|
||||
setproctitle( "\0" );
|
||||
#else
|
||||
if( args_info.proctitle_given )
|
||||
message( "Setting process-title is not supported in this build\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue