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
------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Dmtcp-forum mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dmtcp-forum