setprogname()

QNX SDP8.0C Library ReferenceAPIDeveloper

Set the name of the current program

Synopsis:

#include <sys/process.h>

char const  *__progname;

void setprogname(char const * const name)
            

Arguments:

name
The new name to set for the current program.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The setprogname() function sets the name of the current program to be the last path-name component of the name argument.

CAUTION:
Since a pointer to the given string is kept as the program name, this string shouldn't be modified or released for the rest of the program's lifetime.

Classification:

QNX OS

Safety:
Cancellation pointNo
Signal handlerYes
ThreadYes
Page updated: