This is Unofficial EPICS BASE Doxygen Site
osdProcess.c
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2002 The University of Chicago, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2002 The Regents of the University of California, as
5 * Operator of Los Alamos National Laboratory.
6 * EPICS BASE Versions 3.13.7
7 * and higher are distributed subject to a Software License Agreement found
8 * in file LICENSE that is included with this distribution.
9 \*************************************************************************/
10 
11 /*
12  * Operating System Dependent Implementation of osiProcess.h
13  *
14  * Author: Jeff Hill
15  *
16  */
17 
18 #include <limits.h>
19 #include <string.h>
20 
21 #include "osiProcess.h"
22 
23 LIBCOM_API osiGetUserNameReturn epicsStdCall osiGetUserName (char *pBuf, unsigned bufSizeIn)
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 }
44 
46  (const char *pProcessName, const char *pBaseExecutableName)
47 {
49 }
osiSpawnDetachedProcessReturn
Definition: osiProcess.h:35
LIBCOM_API osiGetUserNameReturn epicsStdCall osiGetUserName(char *pBuf, unsigned bufSizeIn)
Definition: osdProcess.c:33
LIBCOM_API osiSpawnDetachedProcessReturn epicsStdCall osiSpawnDetachedProcess(const char *pProcessName, const char *pBaseExecutableName)
Definition: osdProcess.c:61
osiGetUserNameReturn
Definition: osiProcess.h:25