[Previous]
[Contents]
[Next]

_cmdname()

get the executing program's pathname

Synopsis:

#include <process.h>
char *_cmdname( char *buffer );

Description:

The _cmdname() function obtains a copy of the executing program's pathname, and places it in buffer.

Returns:

If the pathname of the executing program cannot be determined then NULL is returned; otherwise the value of buffer is returned.

Examples:

#include <stdio.h>
#include <process.h>

void main()
  {
    char buffer[PATH_MAX];

    printf( "%s\n", _cmdname( buffer ) );
  }

Classification:

WATCOM

Safety:
Interrupt handler No
Signal handler Yes, but modifies errno
Thread Yes

See also:

getcmd()


[Previous]
[Contents]
[Next]