Back to index

glibc  2.9
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.


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");
      puts (dir);
      free (dir);

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

Here is the call graph for this function: