Message327135
For the sake of completeness, same deal in pure C:
$ cat devnul.c
#include <stdio.h>
int main(void) {
FILE *f = fopen("/dev/null", "w");
printf("tell() = %ld\n", ftell(f));
printf("write(\"abcdefgh\") = %zu\n", fwrite("abcdefgh", 1, 8, f));
printf("tell() = %ld\n", ftell(f));
printf("seek(8) = %d\n", fseek(f, 8, 0));
printf("tell() = %ld\n", ftell(f));
return 0;
}
$ gcc devnulc -o devnul
$ ./devnull
tell() = 0
write("abcdefgh") = 8
tell() = 8
seek(8) = 0
tell() = 0 |
|
Date |
User |
Action |
Args |
2018-10-05 13:12:57 | erik.bray | set | recipients:
+ erik.bray, serhiy.storchaka, xtreak |
2018-10-05 13:12:57 | erik.bray | set | messageid: <1538745177.11.0.545547206417.issue34904@psf.upfronthosting.co.za> |
2018-10-05 13:12:57 | erik.bray | link | issue34904 messages |
2018-10-05 13:12:57 | erik.bray | create | |
|