| 178 | /************************************************************************/ |
| 179 | |
| 180 | int msIO_installHandlers( msIOContext *stdin_context, |
| 181 | msIOContext *stdout_context, |
| 182 | msIOContext *stderr_context ) |
| 183 | |
| 184 | { |
| 185 | msIOContextGroup *group; |
| 186 | |
| 187 | msIO_Initialize(); |
| 188 | |
| 189 | group = msIO_GetContextGroup(); |
| 190 | |
| 191 | if( stdin_context == NULL ) |
| 192 | group->stdin_context = default_contexts.stdin_context; |
| 193 | else if( stdin_context != &group->stdin_context ) |
| 194 | group->stdin_context = *stdin_context; |
| 195 | |
| 196 | if( stdout_context == NULL ) |
| 197 | group->stdout_context = default_contexts.stdout_context; |
| 198 | else if( stdout_context != &group->stdout_context ) |
| 199 | group->stdout_context = *stdout_context; |
| 200 | |
| 201 | if( stderr_context == NULL ) |
| 202 | group->stderr_context = default_contexts.stderr_context; |
| 203 | else if( stderr_context != &group->stderr_context ) |
| 204 | group->stderr_context = *stderr_context; |
| 205 | |
| 206 | return MS_TRUE; |
| 207 | } |
| 208 | |
| 209 | /************************************************************************/ |
| 210 | /* msIO_contextRead() */ |
no test coverage detected