Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unix.create_process under windows #2512

Closed
vicuna opened this issue Apr 26, 2004 · 2 comments
Closed

Unix.create_process under windows #2512

vicuna opened this issue Apr 26, 2004 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Apr 26, 2004

Original bug ID: 2512
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Christoph Bauer
Version: 3.07+2 MinGW
OS: Windows 2000/XP
Submission from: 212.43.68.201 (212.43.68.201)

usage:
Unix.create_process program.exe [| p1; p2; ...; pn |] ...

Symptom 1: p1 is not the first paramater for program.exe. It simply vanishes.
Symptom 2: if the path to program.exe contains spaces, the first parameter
is the second part of this path. p1 is ignored as before.

@vicuna
Copy link
Author

vicuna commented May 4, 2004

Comment author: administrator

usage:
Unix.create_process program.exe [| p1; p2; ...; pn |] ...

Symptom 1: p1 is not the first paramater for program.exe. It simply
vanishes.

This is normal Unix and Windows behavior: the first element of the
argument array is "parameter number zero" (argv[0] in C). Most of the
time, you want to put the program name ("program.exe" in your example)
as this parameter 0, but in rare cases a different value for that
parameter can be useful.

Symptom 2: if the path to program.exe contains spaces, the first parameter
is the second part of this path. p1 is ignored as before.

I haven't been able to reproduce this behavior, using an MSVC-compiled
executable as program.exe. It is true that if the parameters p0 ... pN
contain spaces and are not quoted, program.exe will split the
parameters at spaces, causing a mismatch. It might be argued that
create_process should do the quoting itself. But this looks like a
different issue than what you observe. Can you provide an example?

  • Xavier Leroy

@vicuna
Copy link
Author

vicuna commented Jun 12, 2004

Comment author: administrator

Added quoting of arguments 2004-06-12, XL. Symtpom 2 cannot be reproduced with
a C program as target; seems to occur only for batch files; looks like a "cmd"
shell problem, not ours.

@vicuna vicuna closed this as completed Jun 12, 2004
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant