On 27 June 2015 at 21:30, Nils M Holm <n...@t3x.org> wrote:

> It should
> keep echoing after printing "oopsie", but it just exits instead.
> What am I missing?
>

if interrupted, fgetc returns EOF because the underlying read system call
returns -1 (with error string "interrupted").
System calls are interrupted by a note (see notify(2)). Your loop will
therefore stop and exit.

Also, see /sys/doc/comp.ms for some other details of the Plan 9 C
environment. For instance, main is
      void main(int, char**);
and you need an explicit call to exits [sic] at the end of main, not a
return 0 (or you'll get an error status "main"
returned to the shell).

Reply via email to