Preparing for new release. Bumped version number to 1.1.6.
Add:  ./configure --enable-condor-support, --disable-stale-socket-handling,
 and --enable-external-socket-handling
Changing mtcp.so -> libmtcp.so, everywhere.
MTCP will be used standalone by software such as OpenMPI.  Rationalize the name.
- Rev 568 broke dmtcp for glibc 2.11 on 32-bit Linux. This patch fixes it.
dmtcp_checkpoint now checks if target is 32-bit in 64-bit Linux without
having done:  ./configure --enable-m32;  If so, it issues a warning,
but allows the target to be run anyway.  Probably, ld.so will say
couldn't load LD_PRELOAD library, dmtcphijack.so, and application
will run anyway.  
    Start conservatively, and later change this to refuse to exec
to user app once we have experience.
Bug fixes to previous revision to check for 32-bit app under 64-bit Linux.
- Preparing for release. Bumping version number to 1.1.7.
- Re-inserting the changes from rev:571 which were removed in removed 576.
This fixes a bug in which a process could fail in doing the first checkpoint
about one time in a thousand (more often if machine is heavily loaded).
The bug was caused by an interaction with the exit bug fix in CleanupWorker().
    This revision creates a new class DmtcpCoordinatorAPI all of whose methods
are duplicates of certain methods of DmtcpWorker.  In a later revision,
DmtcpWorker will inherit from DmtcpCoordinatorAPI to remove the duplication.
    The issue is that dmtcpapi.cpp and dmtcp_command.cpp create an extra worker
with argument enableCheckpointing set to false.  They do so to be
able to use the DmtcpWorker method connectAndSendUserCommand() to
send a command to the coordinator.  But when this extra worker calls the
destructor, the DmtcpWorker destructor calls CleanupWorker().
CleanupWorker then sets the WorkerState to UNKNOWN, which sometimes
is transmitted to the coordinator before the worker state can change again.
    The files dmtcpapi.cpp and dmtcp_command.cpp now do all of their
communication with the coordinator using this new class.  The new class
never sets any worker state to UNKNOWN.  It is also a cleaner design,
separating out this functionality from DmtcpWorker, which was getting too large.
Where locks are used (to delay checkpointing during communication with
coordinator), methods from the old DmtcpWorker class are still used
for those locks.
    There are still a small number of other calls to the DmtcpWorker
constructor for temporary communication with the coordinator (for example,
to inquire about status with the 's' command).  These calls invoke
the constructor with argument false, and so are easy to find.  Those
will also be replaced by a call to the DmtcpCoordinatorAPI constructor
in a later revision after further testing.
DmtcpWorker is now a derived class of DmtcpCoordinatorAPI.
The only remaining unusual constructor (with arg, false) of DmtcpWorker is:
  DmtcpWorker worker ( false );
in dmtcp_restart.cpp.  This should be cleaned up later.  Then the
DmtcpWorker constructor with bool arg can be removed.
After that, DmtcpWorker should probably become a singleton class.
Other minor cleanup (added comments, better formatting, checking return
  values of some system calls) were also added.
Fixing a bug where MTCP did not checkpoint open files.  Also will now checkpoint
fds 0, 1, and 2 if they are pointing to files.

The open file bug was caused by our use of getdents() and not the normal
readdir() system call.  getdents() returns a block of linux_dirent structures,
which are different from a normal dirent structure.
Write dmtcp_restart_script.sh so that if dmtcp_restart not in path, then
use original path from whcih dmtcp_coordinator was called with argv[].
- DmtcpWorker::instance() renamed to DmtcpWorker::Instance()
- Added wrapper for fclose()
- Minor Cleanup
- Condor branch merged into main.
- minor fix to last checking
In mtcp.c, beginnings of a TLS_PID_OFFSET and TLS_TID_OFFSET that will
  work independently of version of glibc.  Conditionalized out for
  now, until further testing.
Also fixed ocmpiler warnings caused by all four files below.
    mtcp.c now fixed so that it searches for current (tid, pid) within
struct pthread, and determines TLS_TID_OFFSET/TLS_PID_OFFSET from that.
It will take effect with glibc-2.12 and later.
    In mtcp_check_vdso.c, two functions declared static (avoid name pollution).
Fixed bug in last revision with TLS_TID_OFFSET().  Also, if tid_offset of
glibc-2.12 and higher doesn't agree with glibc-2.11, print a warning to user.
This revision should fix the bug we were seeing with libmtcp.so not being
restored at restart time due to an address conflict with vdso. Fix is to
munmap vdso on restart.

Also, a minor fix to the handling of the argv array when we need to re-exec
due to the address conflict.
MTCP now checkpoints signal handlers if not running under DMTCP.

Standalone MTCP has not been checkpointing signal handlers ever since DMTCP was
created.  However, this functionality has now been restored.  Currently, if
DMTCP is present, DMTCP will handle signals, but it may make more sense for
MTCP to always provide this functionality, as signals are local to a single
process.

A new variable has also been added to mtcp.c called dmtcp_exists.  This variable
is set by DMTCP, and tells MTCP that it is running under DMTCP.  This is a much
more scalable approach to this problem, as it allows both DMTCP and standalone
MTCP to exist simultaneously on a single system (as opposed to the old approach
of using a preprocessor conditional).