1997-02-14 08:29:10 -08:00
|
|
|
/***********************************************************************/
|
|
|
|
/* */
|
2011-07-27 07:17:02 -07:00
|
|
|
/* OCaml */
|
1997-02-14 08:29:10 -08:00
|
|
|
/* */
|
|
|
|
/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
|
|
|
|
/* */
|
|
|
|
/* Copyright 1997 Institut National de Recherche en Informatique et */
|
1999-11-17 10:59:06 -08:00
|
|
|
/* en Automatique. All rights reserved. This file is distributed */
|
2001-12-07 05:41:02 -08:00
|
|
|
/* under the terms of the GNU Library General Public License, with */
|
|
|
|
/* the special exception on linking described in file ../../LICENSE. */
|
1997-02-14 08:29:10 -08:00
|
|
|
/* */
|
|
|
|
/***********************************************************************/
|
|
|
|
|
2005-03-24 09:20:54 -08:00
|
|
|
#include <fail.h>
|
1997-02-14 08:29:10 -08:00
|
|
|
#include <mlvalues.h>
|
|
|
|
#include "unixsupport.h"
|
|
|
|
#ifdef HAS_UNISTD
|
|
|
|
#include <unistd.h>
|
|
|
|
#endif
|
|
|
|
|
2001-08-28 07:47:48 -07:00
|
|
|
CAMLprim value unix_setsid(value unit)
|
1997-02-14 08:29:10 -08:00
|
|
|
{
|
|
|
|
#ifdef HAS_SETSID
|
|
|
|
return Val_int(setsid());
|
|
|
|
#else
|
|
|
|
invalid_argument("setsid not implemented");
|
|
|
|
return Val_unit;
|
|
|
|
#endif
|
|
|
|
}
|