caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "David Allsopp" <dra-news@metastack.com>
To: <matthieu.dubuget@gmail.com>, <caml-list@inria.fr>
Subject: RE: [Caml-list] Howto execute a command without the "cmd" windows	opening?
Date: Wed, 4 Nov 2009 11:22:41 -0000	[thread overview]
Message-ID: <021001ca5d41$20175d60$60461820$@allsopp@metastack.com> (raw)
In-Reply-To: <4AF16258.6010508@gmail.com>

> The problem is that a "c:\windows\system32\cmd.exe" windows pops up:
> I'd like to avoid this.

Both Sys.command and Unix.system use cmd in order to provide command line
parsing (it gives the closest equivalent to the Unix version - except for
the usual quoting weirdness of cmd as compared to bash!)

> I tried Sys.command and Unix.system without success.
> 
> Is there any way to run a program and get the process status without
> using cmd.exe ?

It's been on my todo list to wrap the CreateProcess Win32 API function[1] in
a C stub function - someone else may have done this (possibly in
ocaml-win32[2] or something like that), though. The API is very simple (most
parameters will be NULL) so the stub would not take long to write.


David

[1] http://msdn.microsoft.com/en-us/library/ms682425(VS.85).aspx
[2] http://caml.inria.fr/cgi-bin/hump.en.cgi?contrib=371


  reply	other threads:[~2009-11-04 11:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-04 11:15 Matthieu Dubuget
2009-11-04 11:22 ` David Allsopp [this message]
2009-11-04 11:24   ` [Caml-list] " Matthieu Dubuget
2009-11-04 11:54     ` Matthieu Dubuget
2009-11-04 12:04       ` David Allsopp
2009-11-04 12:05       ` Adrien
2009-11-04 12:22 ` Alain Frisch
2009-11-04 13:58   ` Matthieu Dubuget

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='021001ca5d41$20175d60$60461820$@allsopp@metastack.com' \
    --to=dra-news@metastack.com \
    --cc=caml-list@inria.fr \
    --cc=matthieu.dubuget@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).