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.
This commit is contained in:
Jeff Hill
2000-06-16 00:21:43 +00:00
parent 828bd4392b
commit 4fb22f09a3

View File

@@ -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 );
}