mirror of git://git.suckless.org/sbase
Check FIFREEZE/FITHAW ioctl for failure
This commit is contained in:
parent
c88ba3750e
commit
23678b96cd
|
@ -45,7 +45,8 @@ main(int argc, char *argv[])
|
|||
fd = open(argv[0], O_RDONLY);
|
||||
if (fd < 0)
|
||||
eprintf("open: %s:", argv[0]);
|
||||
ioctl(fd, fflag == 1 ? FIFREEZE : FITHAW, &p);
|
||||
if (ioctl(fd, fflag == 1 ? FIFREEZE : FITHAW, &p) < 0)
|
||||
eprintf("%s %s:", fflag == 1 ? "FIFREEZE" : "FITHAW", argv[0]);
|
||||
close(fd);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue