From 4fb22f09a3f45c95db7c6123b22336875014845e Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Fri, 16 Jun 2000 00:21:43 +0000 Subject: [PATCH] Fixed use of errlogPrintf () in spawned process ulting in a hang. Removed use of assert() when the executable couldnt be located which aslo caused a hang. --- src/libCom/osi/os/posix/osdProcess.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/libCom/osi/os/posix/osdProcess.c b/src/libCom/osi/os/posix/osdProcess.c index 7ef0f3b57..3ccab4830 100644 --- a/src/libCom/osi/os/posix/osdProcess.c +++ b/src/libCom/osi/os/posix/osdProcess.c @@ -119,12 +119,11 @@ epicsShareFunc osiSpawnDetachedProcessReturn epicsShareAPI osiSpawnDetachedProce * overlay the specified executable */ status = execlp (pBaseExecutableName, pBaseExecutableName, NULL); - if (status<0) { - errlogPrintf ( "The executable \"%s\" couldnt be located\n", pBaseExecutableName ); - errlogPrintf ( "because of errno = \"%s\".\n", strerror (errno) ); - errlogPrintf ( "You may need to modify your PATH environment variable.\n" ); - errlogPrintf ( "Unable to start \"%s\" process.\n", pProcessName); - assert (0); + if ( status < 0 ) { + fprintf ( stderr, "**** The executable \"%s\" couldnt be located\n", pBaseExecutableName ); + fprintf ( stderr, "**** because of errno = \"%s\".\n", strerror (errno) ); + fprintf ( stderr, "**** You may need to modify your PATH environment variable.\n" ); + fprintf ( stderr, "**** Unable to start \"%s\" process.\n", pProcessName); } - exit (0); + exit ( -1 ); }