That was a logic error. Fixed in the latest svn:trunk :-).
Kapil
On Fri, Sep 21, 2012 at 7:05 PM, Louie, Joshua D
<[email protected]>wrote:
> Hi,****
>
> ** **
>
> While writing a series of tests for us to use whenever we get a new
> version of DMTCP to try out, I have uncovered a bug/quirk/feature,****
>
> that I would like to understand. I have a simple version of the code that
> looks like the following:****
>
>
> #include <stdio.h>****
>
> #include <stdlib.h>****
>
> #include <dmtcpaware.h>****
>
> ** **
>
> int main()****
>
> {****
>
> FILE *fp;****
>
> char buffer[1024];****
>
> ** **
>
> printf("Reading from absolute file /tmp/xyz/contents\n");****
>
> fp = fopen("/tmp/xyz/contents", "r");****
>
> ** **
>
> dmtcpCheckpoint();****
>
> ** **
>
> // We should always be reading from /tmp/contents****
>
> printf("Contents are: %s", fgets(buffer, 1024, fp));****
>
> return 0;****
>
> }****
>
> ** **
>
> If I run it in any other directory /tmp/xyz, it saves the absolute path
> and uses it during restore – Everything is fine.****
>
> If I run in /tmp/xyz, then when I do the restore, it didn’t save the
> absolute path, it instead saves it as a relative path.****
>
> Thus, if I restore in another directory with a different “contents” file,
> it will read that one instead.****
>
> If that other directory does not have a “contents” file, it will use the
> original at /tmp/xyz.****
>
> ** **
>
> Is this a reasonable thing to fix? Or is it something like you are using
> the values in the /proc/###/fd, in which case you have to make****
>
> your best determination as to what is relative and what is absolute?****
>
> ** **
>
> Thanks.****
>
> ** **
>
> Joshua Louie
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Dmtcp-forum mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dmtcp-forum