suggested bsd-setproctitle.c

Ben Lindstrom mouring at pconline.com
Tue Nov 7 06:43:36 EST 2000



I'll have to look at it when I get home tonight.. but it does not work
as claimed under Linux.  So I doubt it will work under NeXT.

[mouring at etoh ossh]$ make                                                       
gcc -g -O2 -Wall -I. -I. -I/opt/openssl/include
-DETCDIR=\"/opt/openssh/etc\" -D
SSH_PROGRAM=\"/opt/openssh/bin/ssh\"
-DSSH_ASKPASS_DEFAULT=\"/opt/openssh/libexe
c/ssh-askpass\" -DHAVE_CONFIG_H   -c -o ssh.o ssh.c                             
ssh.c: In function `main':                                                      
ssh.c:568: `__progname' undeclared (first use in this function)                 
ssh.c:568: (Each undeclared identifier is reported only once                    
ssh.c:568: for each function it appears in.)                                    
[mouring at etoh ossh]$ grep HAVE___PROG *.h  
acconfig.h:#undef HAVE___PROGNAME          
config.h:#define HAVE___PROGNAME 1         


SSHing home is a bear for some odd reason lately. <sigh>

- Ben

On Mon, 6 Nov 2000, Kevin Steves wrote:

> On Mon, 6 Nov 2000, Kevin Steves wrote:
> : That should work.  But it seems this __progname issue could be cleaned
> : up by defining the variable in main() files if needed:
> : 
> : #ifndef HAVE___PROGNAME
> : const char *__progname = "foo";
> : #endif
> : 
> : then declaring it (no ifdefs) if it's referenced:
> : 
> : extern const char *__progname;
> : 
> : This gets us closer to OpenBSD's tree with fewer ifdefs.
> : 
> : I'll do this patch unless someone points out what it will break :)
> 
> How does the attached patch look?
> 






More information about the openssh-unix-dev mailing list