Recreate base64 project
This commit is contained in:
		
							
								
								
									
										25
									
								
								wapp/core/os/shell/commander/posix/commander_posix.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								wapp/core/os/shell/commander/posix/commander_posix.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
// vim:fileencoding=utf-8:foldmethod=marker
 | 
			
		||||
 | 
			
		||||
#include "../../../../../common/aliases/aliases.h"
 | 
			
		||||
#include "../../../../../common/platform/platform.h"
 | 
			
		||||
 | 
			
		||||
#ifdef WAPP_PLATFORM_POSIX
 | 
			
		||||
 | 
			
		||||
#include "../commander_output.h"
 | 
			
		||||
#include "../../utils/shell_utils.h"
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
 | 
			
		||||
CMDError get_output_status(FILE *fp, i32 *status_out) {
 | 
			
		||||
  *status_out = wapp_shell_utils_pclose(fp);
 | 
			
		||||
 | 
			
		||||
  if (!WIFEXITED(*status_out)) {
 | 
			
		||||
    return SHELL_ERR_PROC_EXIT_FAIL;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  *status_out = WEXITSTATUS(*status_out);
 | 
			
		||||
 | 
			
		||||
  return SHELL_ERR_NO_ERROR;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif // !WAPP_PLATFORM_POSIX
 | 
			
		||||
		Reference in New Issue
	
	Block a user