[torquedev] Not able to read from a file

rishi pathak mailmaverick666 at gmail.com
Thu Apr 12 22:42:09 MDT 2007

Sorry Garrick for this stupidity of mine.Actually all the time I was
thinking that I was passing a char[] to fgets and infact it was a
char*.Thanks for help.What I am actually trying to do is:
When the job is submitted and if user has specified in the job file that an
alert should be sent to him regarding an approximated starttime of the job a
mail and a SMS is sent to him. For this I have added
an 'x' option to -m (baex).I am using maui's showstart for getting an
initial approximation of starttime.
Sorry again for stupid question and bothering for bothering the list .
I thing I want to know if the function 'svr_mailowner' gets executed in a
separate thread or not.I am asking this because I have seen multiple request
being served simultaenously.

On 4/13/07, Garrick Staples <garrick at clusterresources.com> wrote:
> 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.Thefile
> > 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?
> _______________________________________________
> torquedev mailing list
> torquedev at supercluster.org
> http://www.supercluster.org/mailman/listinfo/torquedev

Rishi Pathak
National PARAM Supercomputing Facility
Center for Development of Advanced Computing(C-DAC)
Pune University Campus,Ganesh Khind Road
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.supercluster.org/pipermail/torquedev/attachments/20070413/4b26ead3/attachment.html

More information about the torquedev mailing list