Skip to content

Unix.getpid returns wrong result #4034

@vicuna

Description

@vicuna

Original bug ID: 4034
Reporter: Christoph Bauer
Status: acknowledged (set by @xavierleroy on 2006-06-10T09:11:56Z)
Resolution: open
Priority: normal
Severity: feature
OS: Windows
Version: 3.09.2
Category: otherlibs
Tags: patch
Monitored by: @nojb @dra27 @alainfrisch

Bug description

Unix.getpid returns a wrong (non-existing) processid.
To reproduce:

ocaml unix.cma
# Unix.getpid ();;

A working implementation of getpid.c could be

#include <mlvalues.h>
#include "unixsupport.h"

CAMLprim value unix_getpid(value unit)
{
  return Val_int( getpid() );
}

File attachments

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions