Some bug-fixes for SharedData.

git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1791 ba6dc0ae-232f-0410-883f-9ebac64fc565
Bugfix for Util::{lock,unlock}File().

git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1792 ba6dc0ae-232f-0410-883f-9ebac64fc565
Cosmetic changes to pidvirt and VirtualIdTable.

git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1793 ba6dc0ae-232f-0410-883f-9ebac64fc565
Move Connection plugin to plugin/conn.

git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1794 ba6dc0ae-232f-0410-883f-9ebac64fc565
Compiler warnings about unused variables removed.

git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1795 ba6dc0ae-232f-0410-883f-9ebac64fc565
Compiler warnings/errors fixed for icc/icpc.

git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1796 ba6dc0ae-232f-0410-883f-9ebac64fc565
Various fixes required for clang.

git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1797 ba6dc0ae-232f-0410-883f-9ebac64fc565
Refine the patchPOSIXUserMaskWork.

(Patch supplied by Kito Cheng)

Call sigismember only once.  This is to prepare for Android port since
the prototype of sigismember in Android is:
  int sigismember(sigset_t *set, int signo);
not
  int sigismember(const sigset_t *set, int signo);

So we need a ugly const_cast for Android port.  Let's call sigismember
only once to prevent the lots of ugly
  \#ifdef/#else/#endif code...

git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1798 ba6dc0ae-232f-0410-883f-9ebac64fc565
Change the return type of *readlink to READLINK_RET_TYPE

(Patch supplied by Kito Cheng)
The return type of  readlink and _real_readlink in
syscallwrappers.h/nosyscallsreal.c/syscallsreal.c has hard code return
type, ssize_t.  It should be READLINK_RET_TYPE.

git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1799 ba6dc0ae-232f-0410-883f-9ebac64fc565
Bug fix for dmtcp/src/Makefile.am

make install was failing due to bad directory config.

git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1800 ba6dc0ae-232f-0410-883f-9ebac64fc565
Bug fix for dmtcp_coordinator with --enable-debug

A static variable initialization caused JTRACE to be called before the
call to initializeJalib() in dmtcp_coordinator.cpp:main(). This caused
an abort().

git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1801 ba6dc0ae-232f-0410-883f-9ebac64fc565
Port code for duplicated fd's detection from old version.
This is nessesary for detection of following scenarios:

test_fd_lauch.c:

#include <stdio.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>

int main()
{
	int tmp, fd1, fd2, i;
	
	tmp = open("test",O_WRONLY|O_CREAT,S_IRUSR|S_IWUSR);
	fd1 = dup2(tmp,100);
	fd2 = dup2(fd1,101);
	close(tmp);

	execlp("dmtcp_checkpoint","dmtcp_checkpoint","./test_fd",NULL);
}

test_fd.c
#include <stdio.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>

int main()
{
	int fd1, fd2,i;
	
	fd1 = 100;
	fd2 = 101;
	
	for(i=0;i<1000000;i++){
		char s[256];
		sprintf(s,"%d(1) ",i);
		write(fd1,s,strlen(s));
		sprintf(s,"%d(2) ",i);
		write(fd2,s,strlen(s));
		sleep(1);
	}
	close(fd1);
	close(fd2);
}



git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1802 ba6dc0ae-232f-0410-883f-9ebac64fc565
- It now works to to define the SETJMP conditional in MTCP.  This used to
    fail on i386/x86-64 because setjmp did pointer mangling while setcontext
    did not.  On arm, only setjmp was available, and it did not do pointer
    mangling.  So, we were using setjmp on arm, and setcontext otherwise.
    The new code directly copies the stack pointer and uses it on restart to
    create a temporary stack area.  MTCP now no longer executes the fragile
    code that tried to recover the stack pointer from the setjmp
    internal struct.


git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1803 ba6dc0ae-232f-0410-883f-9ebac64fc565
Fix for Intel icc/icpc compilers.

git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1804 ba6dc0ae-232f-0410-883f-9ebac64fc565
Minor fix for rev 1804.

git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1805 ba6dc0ae-232f-0410-883f-9ebac64fc565
Torque support related fixes:

1. Fix tm_spawn agrument list processing (one last was erroneously ignored)
2. Fix deleted files handling. Update connection _path before checking (deleted) suffix!



git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1806 ba6dc0ae-232f-0410-883f-9ebac64fc565
Minor fix related to blacklisted files.

git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1807 ba6dc0ae-232f-0410-883f-9ebac64fc565
Bugfix for Connection Plugin.

Detect duplicate fds and delete the Connection object associated with
previous fd.

git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1808 ba6dc0ae-232f-0410-883f-9ebac64fc565
More verbosive connection debug



git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1809 ba6dc0ae-232f-0410-883f-9ebac64fc565
Fix Torque node file restore 



git-svn-id: https://dmtcp.svn.sourceforge.net/svnroot/dmtcp/trunk@1810 ba6dc0ae-232f-0410-883f-9ebac64fc565