This is Unofficial EPICS BASE Doxygen Site
osdProcess.c File Reference
#include <limits.h>
#include <string.h>
#include <remLib.h>
#include "osiProcess.h"
#include "errlog.h"
+ Include dependency graph for osdProcess.c:

Go to the source code of this file.

Macros

#define _VSB_CONFIG_FILE   <../lib/h/config/vsbConfig.h>
 

Functions

LIBCOM_API osiGetUserNameReturn epicsStdCall osiGetUserName (char *pBuf, unsigned bufSizeIn)
 
LIBCOM_API osiSpawnDetachedProcessReturn epicsStdCall osiSpawnDetachedProcess (const char *pProcessName, const char *pBaseExecutableName)
 

Macro Definition Documentation

#define _VSB_CONFIG_FILE   <../lib/h/config/vsbConfig.h>

Definition at line 18 of file osdProcess.c.

Function Documentation

LIBCOM_API osiGetUserNameReturn epicsStdCall osiGetUserName ( char *  pBuf,
unsigned  bufSizeIn 
)

Definition at line 28 of file osdProcess.c.

29 {
30  char pName[MAX_IDENTITY_LEN];
31  unsigned uiLength;
32  size_t len;
33 
34  remCurIdGet ( pName, NULL );
35  len = strlen ( pName );
36 
37  if (len>UINT_MAX || len<=0) {
38  return osiGetUserNameFail;
39  }
40  uiLength = (unsigned) len;
41 
42  if ( uiLength + 1 >= bufSizeIn ) {
43  return osiGetUserNameFail;
44  }
45 
46  strncpy ( pBuf, pName, (size_t) bufSizeIn );
47 
48  return osiGetUserNameSuccess;
49 }
#define NULL
Definition: catime.c:38
LIBCOM_API osiSpawnDetachedProcessReturn epicsStdCall osiSpawnDetachedProcess ( const char *  pProcessName,
const char *  pBaseExecutableName 
)

Definition at line 52 of file osdProcess.c.