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:
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user