summaryrefslogtreecommitdiff
path: root/ocamltest/run.h
blob: 7c13212e1154e95cb53f9f237bf7e0ead4376ac4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**************************************************************************/
/*                                                                        */
/*                                 OCaml                                  */
/*                                                                        */
/*             Sebastien Hinderer, projet Gallium, INRIA Paris            */
/*                                                                        */
/*   Copyright 2016 Institut National de Recherche en Informatique et     */
/*     en Automatique.                                                    */
/*                                                                        */
/*   All rights reserved.  This file is distributed under the terms of    */
/*   the GNU Lesser General Public License version 2.1, with the          */
/*   special exception on linking described in the file LICENSE.          */
/*                                                                        */
/**************************************************************************/

/* Header file for the run library */

#ifndef __RUN_H__

#define __RUN_H__

#include <stdarg.h>
#include <caml/misc.h>

typedef char_os **array;

typedef void Logger(void *, const char *, va_list ap);

typedef struct {
  char_os *program;
  array argv;
  array envp;
  char_os *stdin_filename;
  char_os *stdout_filename;
  char_os *stderr_filename;
  int append;
  int timeout;
  Logger *logger;
  void *loggerData;
} command_settings;

extern int run_command(const command_settings *settings);

#endif /* __RUN_H__ */