Back to index

glibc  2.9
Functions
pwd.c File Reference
#include <mcheck.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int main (void)

Function Documentation

int main ( void  )

Definition at line 25 of file pwd.c.

{
  char *dir;

  /* Let this program be used for debugging.  */
  mtrace ();

  dir = getcwd ((char *) NULL, 0);

  if (dir == NULL)
    perror ("getcwd");
  else
    {
      puts (dir);
      free (dir);
    }

  return (dir == NULL ? EXIT_FAILURE : EXIT_SUCCESS);
}

Here is the call graph for this function: