Lucy
  1. Lucy
  2. LUCY-166

Prefer POSIX over windows.h for process ID

    Details

      Description

      Cygwin processes have a Cygwin PID in addition to the Windows PID. Lucy
      should use the Cygwin PID, which necessitates changing the order of #ifdefs
      in core/Lucy/Util/ProcessID.c. This will allow exec() to work properly
      under Cygwin, in addition to fixing a failing test (t/110-shared_lock.t).

        Activity

        Hide
        Marvin Humphrey added a comment -

        Background: http://cygwin.com/ml/cygwin/2007-10/msg00249.html

        (The reason this PID renaming is necessary is to emulate exec() which
        has the semantics of replacing a process with a new one while keeping
        the same PID, handles, CWD, and so on.  Windows does not have any such
        concept so it has to be emulated by spawning the new process and then
        referring to it by the old PID of the parent that has now terminated,
        even though this child has a new PID assigned by the OS.)
        
        Show
        Marvin Humphrey added a comment - Background: http://cygwin.com/ml/cygwin/2007-10/msg00249.html (The reason this PID renaming is necessary is to emulate exec() which has the semantics of replacing a process with a new one while keeping the same PID, handles, CWD, and so on. Windows does not have any such concept so it has to be emulated by spawning the new process and then referring to it by the old PID of the parent that has now terminated, even though this child has a new PID assigned by the OS.)
        Hide
        Marvin Humphrey added a comment -

        Committed to trunk as r1140387.

        Show
        Marvin Humphrey added a comment - Committed to trunk as r1140387.

          People

          • Assignee:
            Marvin Humphrey
            Reporter:
            Marvin Humphrey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development