[wg-windows] Problem (and fix) with Unix.create_process in windows

David Allsopp dra-news at metastack.com
Tue Sep 1 21:33:22 BST 2015


That’s all great information to include in code/commit comments with any patches (links to bug tracker reports can be useful as well). The key thing with changes like this is to have as much pertinent info included as possible as to why the change was made so that future issues/changes can avoid hopefully regressions.


David

From: wg-windows [mailto:wg-windows-bounces at lists.ocaml.org] On Behalf Of Leonardo Laguna Ruiz
Sent: 01 September 2015 20:52
To: Daniel Bünzli
Cc: wg-windows at lists.ocaml.org
Subject: Re: [wg-windows] Problem (and fix) with Unix.create_process in windows



I was curious about what Qt makes when calling a process, since we have used Qt in windows without problems when calling processes. Seems that they do exactly what my fix makes:

https://github.com/Vitallium/qt5/blob/master/qtbase/src/corelib/io/qprocess_win.cpp

I would assume that this change is safe and compatible since it has been in Qt for a while.

Leonardo

On 01 Sep 2015, at 15:20, Daniel Bünzli <daniel.buenzli at erratique.ch<mailto:daniel.buenzli at erratique.ch>> wrote:
Le mardi, 1 septembre 2015 à 14:01, Leonardo Laguna a écrit :

Has anyone had these kind of problems?

Not yet.


Is is possible to get this change in the ocaml code?
This surely qualifies as bug. No escaping should be needed on Unix.create_process and whathever you give as arguments should end up in the sub process' Sys.argv as given. A mantis http://caml.inria.fr/mantis/ issue and a patch (possibly on github) are likely most welcome.

FWIW I have this link about the problem [1] I intended to study at a certain point. It might be worth giving it a read.

Best,

Daniel

[1] http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ocaml.org/pipermail/wg-windows/attachments/20150901/12d5a6c0/attachment-0001.html>


More information about the wg-windows mailing list