[torquedev] Not able to read from a file

Garrick Staples garrick at clusterresources.com
Thu Apr 12 15:12:02 MDT 2007

I think this thread can safely stay on torquedev.

On Thu, Apr 12, 2007 at 05:29:59PM +0530, rishi pathak alleged:
> This is kind of peculiar.
> What I am trying is to get open a file in svr_mailowner function in the
> /src/server/svr_mail.c.
> The file descriptor returned is valid (it is > 0) but when I try to read
> from the file using fgets, the call fails.I tried with fscanf too and this
> time call executes normally but there no value in the input buffer.The file
> which I am trying to read is present  and has some content.
> I copied the code and used it in a simple C program and it works fine with
> the same file.
> I dont know why this is happening.
> Can someone shed some light on this..

TORQUE doesn't change the rules of C or anything :)

fgets() returns a NULL on failure and should be setting errno.  So what
is the errror?

More information about the torquedev mailing list