print error code

This commit is contained in:
twoneis 2025-04-25 09:26:22 +02:00
parent a54e0a7f8b
commit 9b04614543

View file

@ -51,10 +51,10 @@ main(void)
int ret;
ret = pipe2(spray[i], O_NONBLOCK);
if (ret < 0) {
printf("main: error: pipe2: object %lu\n", i);
printf("main: error: object %lu pipe2: %i\n", i, ret);
exit(-1);
}
ret = fcntl(spray[i][0], F_SETPIPE_SZ, 8);
ret = fcntl(spray[i][0], F_SETPIPE_SZ, 8192);
if (ret < 0) {
printf("main: error: fcntl: object %lu\n", i);
exit(-1);