| 1 |
/*=========================================================================== |
| 2 |
Copyright (C) 1995-2009 European Southern Observatory (ESO) |
| 3 |
|
| 4 |
This program is free software; you can redistribute it and/or |
| 5 |
modify it under the terms of the GNU General Public License as |
| 6 |
published by the Free Software Foundation; either version 2 of |
| 7 |
the License, or (at your option) any later version. |
| 8 |
|
| 9 |
This program is distributed in the hope that it will be useful, |
| 10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
GNU General Public License for more details. |
| 13 |
|
| 14 |
You should have received a copy of the GNU General Public |
| 15 |
License along with this program; if not, write to the Free |
| 16 |
Software Foundation, Inc., 675 Massachusetts Ave, Cambridge, |
| 17 |
MA 02139, USA. |
| 18 |
|
| 19 |
Correspondence concerning ESO-MIDAS should be addressed as follows: |
| 20 |
Internet e-mail: [email protected] |
| 21 |
Postal address: European Southern Observatory |
| 22 |
Data Management Division |
| 23 |
Karl-Schwarzschild-Strasse 2 |
| 24 |
D 85748 Garching bei Muenchen |
| 25 |
GERMANY |
| 26 |
===========================================================================*/ |
| 27 |
|
| 28 |
/*--------------------------ospsystem-------------------------------------- |
| 29 |
.TYPE routine |
| 30 |
.NAME ospsystem |
| 31 |
.MODULE osp (operating system independant interface, processes) |
| 32 |
.ENVIRONMENT unix |
| 33 |
.LANGUAGE C |
| 34 |
.AUTHOR Trond Melen (IPG-ESO Garching) |
| 35 |
.PURPOSE |
| 36 |
Execute a command in a shell (The Borne shell under UNIX) or to a |
| 37 |
command line interpreter (DCL under VMS). |
| 38 |
.ALGORITHM |
| 39 |
UNIX: use the "system()" library call with no changes. |
| 40 |
|
| 41 |
.RETURNS |
| 42 |
Error status of the command (UNIX only). |
| 43 |
----------------------------------------------------------------------*/ |
| 44 |
|
| 45 |
#include <stdio.h> |
| 46 |
#include <stdlib.h> |
| 47 |
|
| 48 |
int ospdebug = 0; /* flag controlling debug printings */ |
| 49 |
|
| 50 |
/* The very simple UNIX implementation. */ |
| 51 |
|
| 52 |
long ospsystem(command) |
| 53 |
char command[]; |
| 54 |
{ |
| 55 |
return(system(command)); |
| 56 |
} |