Skip to main content
11 events
when toggle format what by license comment
Mar 19, 2020 at 5:51 vote accept Rick
May 12, 2019 at 6:29 history edited Rui F Ribeiro CC BY-SA 4.0
deleted 16 characters in body
Feb 25, 2019 at 5:36 vote accept Rick
Feb 25, 2019 at 8:40
Feb 25, 2019 at 5:30 history edited Rick CC BY-SA 4.0
if else reversed; added 86 characters in body
Feb 23, 2019 at 15:35 history edited ctrl-alt-delor CC BY-SA 4.0
spelling
Feb 23, 2019 at 14:25 review Close votes
Feb 23, 2019 at 19:33
Feb 23, 2019 at 13:51 comment added user313992 //1 doesn't have an "empty stdin", but a stdin connected to the tty. If you want an "empty" stdin, test it with ./a.out <&-. Notice that the if/else are reversed in that code snippet ;-) (and that that's not a reliable way to test whether a file is seekable).
Feb 23, 2019 at 13:44 answer added cg909 timeline score: 4
Feb 23, 2019 at 13:31 comment added Kusalananda I can't reproduce your seek OK with the given program on OpenBSD (cat file | ./a.out returns seek OK though). There's something wonky about the code. The terminal device (which is attached to the a.out process when no redirection is done) is not seekable.
Feb 23, 2019 at 13:22 comment added Rick I just found out that Unix C API calls is ontopic here :).
Feb 23, 2019 at 13:22 history asked Rick CC BY-SA 4.0