25 lines
550 B
C
25 lines
550 B
C
// vim:fileencoding=utf-8:foldmethod=marker
|
|
|
|
#include "../../../../common/aliases/aliases.h"
|
|
#include "../../../../common/platform/platform.h"
|
|
|
|
#ifdef WP_PLATFORM_WINDOWS
|
|
|
|
#include "../commander_output.h"
|
|
#include "../../utils/shell_utils.h"
|
|
#include <stdio.h>
|
|
|
|
WpCmdError getOutputStatus(FILE *fp, i32 *status_out) {
|
|
if (!feof(fp)) {
|
|
// Ensure process is closed on failure
|
|
wpShellUtilsPclose(fp);
|
|
return WP_SHELL_ERR_PROC_EXIT_FAIL;
|
|
}
|
|
|
|
*status_out = wpShellUtilsPclose(fp);
|
|
|
|
return WP_SHELL_ERR_NO_ERROR;
|
|
}
|
|
|
|
#endif // !WP_PLATFORM_WINDOWS
|