[comp.lang.c] Quick C System Call problem

news@udenva.cair.du.edu (netnews) (05/28/90)

I use the Quick C compiler (v.1).  I've been having problems using
the "system" calls (e.g., system ("type a.fil |more") ).  After
making 4 or 5 of such calls, the program hangs.  Sometimes I need
to reboot, but other times a simple control c gets me out.

Tracing with debugger and pointer-checker activated will show two
types of problems.

1.  It just hangs after one of these calls, leaving the debugger
    "in the dark,"

2.  Near pointer error; indicates a line of code where a file is
    being read; e.g., 

        while ((ch=fgetc(tmp_fp))!='\n')
    ----->      rlog.comments[n++]=ch;

    I suppose it's referring to the file pointer tmp_fp, as rlog is
    just a structure.

If no one knows of something obvious that I'm overlooking (e.g.,
failure to properly close files, insufficient environmental space,
the don't-ever-use-Quick-C's-"system"-call rule, etc.), then I
guess I'll start debugging by removing, one-by-one each system call
and seeing what happens.

Thanks,




Art

awinterb@du.edu