mirror of
				https://github.com/Ascend/ascend-docker-runtime.git
				synced 2025-11-01 02:52:43 +08:00 
			
		
		
		
	Match-id-6b1150d20beff1efde2654461ec07a0afa9e8a88
This commit is contained in:
		| @@ -76,7 +76,6 @@ static bool PidCmdArgParser(struct CmdArgs *args, const char *arg) | |||||||
|         Logger("args, arg pointer is null!", LEVEL_ERROR, SCREEN_YES); |         Logger("args, arg pointer is null!", LEVEL_ERROR, SCREEN_YES); | ||||||
|         return false; |         return false; | ||||||
|     } |     } | ||||||
|     errno = 0; |  | ||||||
|     args->pid = strtol(optarg, NULL, DECIMAL); |     args->pid = strtol(optarg, NULL, DECIMAL); | ||||||
|     const char* pidMax = "/proc/sys/kernel/pid_max"; |     const char* pidMax = "/proc/sys/kernel/pid_max"; | ||||||
|     const size_t maxFileSzieMb = 10; // max 10MB |     const size_t maxFileSzieMb = 10; // max 10MB | ||||||
| @@ -84,6 +83,7 @@ static bool PidCmdArgParser(struct CmdArgs *args, const char *arg) | |||||||
|         Logger("failed to check pid_max path.", LEVEL_ERROR, SCREEN_YES); |         Logger("failed to check pid_max path.", LEVEL_ERROR, SCREEN_YES); | ||||||
|         return false; |         return false; | ||||||
|     } |     } | ||||||
|  |     errno = 0; | ||||||
|     FILE* pFile = NULL; |     FILE* pFile = NULL; | ||||||
|     pFile = fopen(pidMax, "r"); |     pFile = fopen(pidMax, "r"); | ||||||
|     if ((pFile == NULL) || (fgets(buff, PATH_MAX, pFile) == NULL)) { |     if ((pFile == NULL) || (fgets(buff, PATH_MAX, pFile) == NULL)) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 BianTanggui
					BianTanggui