From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p82A3aOn020131 for ; Fri, 2 Sep 2011 12:03:36 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4AAHqpYE7RVdU2kGdsb2JhbABChE2kBwgUAQEBAQkJDQcUBCKBRgEBAQECARICDx0BOAEDAQsBBQULAwwCJgICIhIBBQEcBhMih1AEmTUKi32DFoUqiSgCAwaBJoQogREEkyyMZTyBR4Im X-IronPort-AV: E=Sophos;i="4.68,318,1312149600"; d="scan'208";a="107481491" Received: from mail-yw0-f54.google.com ([209.85.213.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 02 Sep 2011 12:03:32 +0200 Received: by ywo32 with SMTP id 32so2853281ywo.27 for ; Fri, 02 Sep 2011 03:03:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=eDSfoLeYOPDJ/wfX2Zyxu8j0jSuFdTSdkw8i3UxuoAk=; b=lheCmZqPyiP+9dAE6HAttoBTwJSUZPy32XXRilj47aFiWGmGxRnSHV7ND7ULx2ya/k AqwQFVbGN78VHDI0j+QQdQDHn3LHnPAb5Dtl5XJ47J/UiS1+CHs3spW/WicJ0c9+Eqzn SrZ95/Bl5mP0FoUvC4gJIb4tUvQB++Q7qFx7Q= MIME-Version: 1.0 Received: by 10.147.53.37 with SMTP id f37mr660136yak.25.1314957810479; Fri, 02 Sep 2011 03:03:30 -0700 (PDT) Sender: daniel.c.buenzli@gmail.com Received: by 10.147.32.14 with HTTP; Fri, 2 Sep 2011 03:03:30 -0700 (PDT) In-Reply-To: References: Date: Fri, 2 Sep 2011 12:03:30 +0200 X-Google-Sender-Auth: 3kJcOwaMy1p-C8zO1se2yfmQILk Message-ID: From: =?UTF-8?Q?Daniel_B=C3=BCnzli?= To: David Allsopp Cc: "caml-list@inria.fr" Content-Type: text/plain; charset=UTF-8 Subject: Re: [Caml-list] Cross-platform cpu count > It won't - Sys.os_type returns "Cygwin" and getconf isn't in Cygwin either - http://cygwin.com/ml/cygwin/2010-12/msg00435.html (actually, it may be now - I haven't upgraded my Cygwin in a while - but it'll be a recent addition) Ok thanks. Apparently it may eventually [1]. > Personally, even for something where it's unimportant, I'd be nervous relying on an environment variable (which can be edited...) I'm even more nervous about calling command line tools. The right way would be to use sysconf(3) or systcl(3), but Sys or Unix doesn't provide them. Best, Daniel [1] http://www.mail-archive.com/cygwin-patches@cygwin.com/msg05220.html