tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* du-4.0b and getlogin(2)
@ 1997-07-29 10:05 Bernt Christandl
  0 siblings, 0 replies; only message in thread
From: Bernt Christandl @ 1997-07-29 10:05 UTC (permalink / raw)
  To: tru64-unix-managers


Hello managers,

is getlogin(2) broken under du-4.0b???

I have a small c-programm, 

  #include <unistd.h>
  main() {
    char *val;
    val = getlogin();
    if ( val == (char *)NULL ) { 
      perror("getlogin(2) failed");
    } else { 
      printf("getlogin(2): login name = %s\n", val);
    }
  } 

which runs under du-4.0a and returns the loginname, 
while under du-4.0b an error is returned:

    getlogin(2) failed: Invalid argument


Obviously i've missed something? What's the problem here? 

Thank you!

Bernt Christandl
                                                                       
----------------------------------------------------------------------
- Bernt Christandl / Max Planck Institut - Extraterrestrische Physik -
- D-85740 Garching / Phone: +49/89/3299-3342 / Fax: +49/89/3299-3569 - 
-                    email: beb@mpe.mpg.de                           - 
----------------------------------------------------------------------

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-07-29 10:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-07-29 10:05 du-4.0b and getlogin(2) Bernt Christandl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox