Bug #633
add exit code checking after write is finished
0%
Description
The exit code of the process running the handler is not checked when stdout is closed. The following was noticed using a groovy script, but it might apply to all scripts. If some write has occurred to stdout, WSS returns a status 200 and continues to stream stdout. When an error occurs in the handler and the handler does a clean stop, it appears that stdout is closed, which is a trigger to WSS streaming output to finish, which it does, with no further checks. But in the handlers observed, the exit code was 1 (i.e. not zero) and error information was available on stderr. There should probably be a wait for process to finish and if the exit code is not 0, check stderr. Logging is the only think that can be done at that point.
History
#1 Updated by Mike Stults almost 10 years ago
added check for non zero exit code from handler after stdout closed, also added write of error text to stdout stream if not zero exit code
#2 Updated by Mike Stults almost 10 years ago
- Target version set to 1.1.9
#3 Updated by Robert Weekly almost 10 years ago
Confirmed this fix. Setting a handler to sleep past the WSS timeout limit results in two 256-byte error messages being written.
Recommend that bug be closed.
000000##ERROR#######ERROR##STREAMERROR##STREAMERROR#STREAMERROR This data stream was interrupted and is likely incomplete. #STREAMERROR##STREAMERROR##STREAMERROR##STREAMERROR#STREAMERROR #STREAMERROR##STREAMERROR##STREAMERROR##STREAMERROR#STREAMERROR 000000##ERROR#######ERROR##STREAMERROR##STREAMERROR#STREAMERROR This data stream was interrupted and is likely incomplete. #STREAMERROR##STREAMERROR##STREAMERROR##STREAMERROR#STREAMERROR #STREAMERROR##STREAMERROR##STREAMERROR##STREAMERROR#STREAMERROR
#4 Updated by Robert Weekly almost 10 years ago
- Resolution set to Fixed
- Status changed from New to Resolved
Closed.
#5 Updated by Robert Weekly almost 10 years ago
- Status changed from Resolved to Closed