| Anonymous | Login | Signup for a new account | 2013-05-21 08:23 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0004906 | OCaml | OCaml general | public | 2009-11-02 12:49 | 2012-09-17 17:42 | ||||||
| Reporter | fhars | ||||||||||
| Assigned To | |||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||||
| Status | acknowledged | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | 3.11.1 | ||||||||||
| Target Version | 4.00.2+dev | Fixed in Version | |||||||||
| Summary | 0004906: $PWD not set in Sys.command after Sys.chdir on Solaris | ||||||||||
| Description | If you start a command with Sys.command on Solaris (not OpenSolaris), $PWD always has the same value it had at the start of the program, even after a Sys.chdir: Objective Caml version 3.11.1 # Sys.command "echo $PWD";; /home/fhars/godi32/bin - : int = 0 # Sys.chdir "/home/fhars";; - : unit = () # Sys.command "echo $PWD";; /home/fhars/godi32/bin - : int = 0 # Sys.getcwd ();; - : string = "/home/fhars" This at least breaks the build for godi. | ||||||||||
| Additional Information | For comparision, the expected behaviour observed on linux: Objective Caml version 3.10.2 # Sys.command "echo $PWD";; /home/hars - : int = 0 # Sys.chdir "bin";; - : unit = () # Sys.command "echo $PWD";; /home/hars/bin - : int = 0 # Sys.getcwd ();; - : string = "/home/hars/bin" | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Notes |
|
|
(0005145) doligez (manager) 2009-11-02 14:14 |
This smells like a bug in your shell. It's the shell launched by Sys.command that is supposed to set the PWD variable. |
|
(0005156) gerd (reporter) 2009-11-09 17:33 |
Yes, it's a bug in /bin/sh, or better, Solaris' /bin/sh predates the POSIX shell specification, and Sun never managed to switch to a compliant shell. I think it is pointless to make the vendor accountible - after all, we have to live with what exists on the OS. Note that there are also $PWD references in the Ocaml Makefiles, i.e. the build is broken on Solaris. |
|
(0008097) doligez (manager) 2012-09-17 17:42 |
Do we care about Solaris enough to implement a workaround? Note that we'll also need to change the makefiles. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2009-11-02 12:49 | fhars | New Issue | |
| 2009-11-02 14:14 | doligez | Note Added: 0005145 | |
| 2009-11-09 17:33 | gerd | Note Added: 0005156 | |
| 2009-12-08 17:46 | doligez | Status | new => acknowledged |
| 2012-07-11 13:34 | doligez | Target Version | => 4.01.0+dev |
| 2012-07-31 13:36 | doligez | Target Version | 4.01.0+dev => 4.00.1+dev |
| 2012-09-17 17:42 | doligez | Note Added: 0008097 | |
| 2012-09-17 17:42 | doligez | Target Version | 4.00.1+dev => 4.00.2+dev |
| Copyright © 2000 - 2011 MantisBT Group |