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

MacOSX error with Sys.command #3049

Closed
vicuna opened this issue Nov 22, 2001 · 2 comments
Closed

MacOSX error with Sys.command #3049

vicuna opened this issue Nov 22, 2001 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Nov 22, 2001

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

Bug description

Hi

Having migrated to OSX I just experienced a problem with Sys.command. It
seems that there is some virual timer working that expires in some cases. So
programs that work usually do not if being called via Sys.commmand. Example

Sys.command "cd /Users/ap/Unix/sE20;make yacc.cmo";;
/sw/bin/ocamlc -thread -I /Users/ap/Unix/sE20 -I /Users/ap/Unix/sE20/BuiltIn
-I /Users/ap/Unix/sE20/bin -c yacc.ml
make: *** [yacc.cmo] Virtual timer expired

  • : int = 2

I cannot remember anything of this kind being discussed in the mailing list

Best regards

Axel Poigné


Dipl.Ing. Dr.rer.nat. Axel Poigné http://www.ais.fraunhofer.de/~ap
mailto:poigne@ais.fraunhofer.de
Fraunhofer AiS Tel: (+) 2241 142440
Schloss Birlinghoven Fax: (+) 2241 142324
D-53754 Sankt Augustin
Germany


Have a look at our new language for designing Embedded Software

sE = Java + synchronous Languages (http://www.ais.fraunhofer.de/~ap/sE)

@vicuna
Copy link
Author

vicuna commented Nov 26, 2001

Comment author: administrator

Having migrated to OSX I just experienced a problem with
Sys.command. It seems that there is some virual timer working that
expires in some cases. So programs that work usually do not if being
called via Sys.commmand. Example

Sys.command "cd /Users/ap/Unix/sE20;make yacc.cmo";;
/sw/bin/ocamlc -thread -I /Users/ap/Unix/sE20 -I /Users/ap/Unix/sE20/BuiltIn
-I /Users/ap/Unix/sE20/bin -c yacc.ml
make: *** [yacc.cmo] Virtual timer expired

  • : int = 2

The virtual timer in question is the one used for time-slicing in the
threads library. Most Unix systems de-activate the timers before doing
exec() of another program (as per the Unix98 spec), but apparently
MacOS X isn't one of these. Hence the timer is still running in the
exec-ed program, causing it to abort.

One workaround is to use Unix.system (in OCaml 3.02 and up) or
ThreadUnix.system (in earlier releases) instead of Sys.command,
because the former deactivate the timer correctly.

Best regards,

  • Xavier Leroy

@vicuna
Copy link
Author

vicuna commented Nov 30, 2001

Comment author: administrator

MacOS X doesn't conform to the Unix98 spec w.r.t. interval timers and exec. A
workaround is to use Unix.system rather than Sys.command.

@vicuna vicuna closed this as completed Nov 30, 2001
@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