LINUX.ORG.RU

История изменений

Исправление reprimand, (текущая версия) :

char buffer[1]
int status;
int fd = open()
if (read(fd, buffer, sizeof(buffer)) < 0) return EXIT_FAILURE;
if (buffer[0] == '0') status = 0 else status = 1
close(fd)

Исходная версия reprimand, :

char buffer[1]
int status;
int fd = open()
read(fd, buffer, sizeof(buffer))
if (buffer[0] == '0') status = 0 else status = 1
close(fd)