Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolution for bug for hanging apache process when Mumps process is killed... #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion m_apache/m_apache.c
Original file line number Diff line number Diff line change
Expand Up @@ -2935,8 +2935,21 @@ int mgwsi_db_receive_ex(MGWSIREQ *lp_request, unsigned char * data, int size, sh
else {
len = 0;
for (;;) {

n = MGWSI_NET_RECV(lp_request->lp_mgwsicon->sockfd, data + len, size - len, 0);

//smh - fix the bug of 100% cpu apache processes which don't die!
//This part of the routine does not check if the connection is broken
//and then get out. I do that here. See below for broken conditions.
//
//http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=%2Fapis%2Frecv.htm

if (n == 0) { //CONNECTION IS BROKEN!
//errno has the error code, but it isn't useful to check
len = n;
break;
}
//end smh changes

if (n < 0) {
len = n;
Expand Down
Binary file added m_apache/m_apache22.so.x86_64
Binary file not shown.