Version française
Home     About     Download     Resources     Contact us    
Browse thread
a syntax error that I don't get
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Philippe Strauss <philou@p...>
Subject: a syntax error that I don't get
Hello caml'ers

This one is short, I'm writting a signal handler:

205: let sig_exit () =
206:    Unix.kill !chpid Sys.sigterm ;
207:    match (Unix.waitpid [] !chpid) with
208:    | pid, Unix.WSIGNALED (Sys.sigterm) -> log `LOG_NOTICE "child 
terminated by parent"
209:    | pid, pstat -> log `LOG_ERR "child asked to terminate by 
parent, but unexpected process status received"

and compilation chokes on:

philou@air:~/mysrc/deconvolution/jackond$ make
ocamlfind opt -thread -package 
unix,threads,netsys,netstring,netplex,rpc,equeue,jack,str,syslog -c 
patcher.ml -o patcher.cmx
File "patcher.ml", line 208, characters 28-35:
Error: Syntax error
make: *** [patcher.cmx] Error 2

replacing Sys.sigterm by -11 or signumber, it compiles fine.

I don't get it.

It's using ocaml 3.12 of godi, on osx 10.6.5, x86_64