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

Go to the source code of this file.

Functions

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

Function Documentation

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

Definition at line 23 of file osdProcess.c.

24 {
25  const char *pName = "rtems";
26  unsigned uiLength;
27  size_t len;
28 
29  len = strlen (pName);
30 
31  if ( len>UINT_MAX || len<=0 ) {
32  return osiGetUserNameFail;
33  }
34  uiLength = (unsigned) len;
35 
36  if ( uiLength + 1 >= bufSizeIn ) {
37  return osiGetUserNameFail;
38  }
39 
40  strncpy ( pBuf, pName, (size_t) bufSizeIn );
41 
42  return osiGetUserNameSuccess;
43 }
LIBCOM_API osiSpawnDetachedProcessReturn epicsStdCall osiSpawnDetachedProcess ( const char *  pProcessName,
const char *  pBaseExecutableName 
)

Definition at line 46 of file osdProcess.c.