diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /unix/boot/bootlib/oscmd.c | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'unix/boot/bootlib/oscmd.c')
-rw-r--r-- | unix/boot/bootlib/oscmd.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/unix/boot/bootlib/oscmd.c b/unix/boot/bootlib/oscmd.c new file mode 100644 index 00000000..0f9c9755 --- /dev/null +++ b/unix/boot/bootlib/oscmd.c @@ -0,0 +1,27 @@ +/* Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + */ + +#include <string.h> +#include "bootlib.h" + +#define SZ_CMD 2048 + +/* OS_CMD -- Send a command to the host system. + */ +int +os_cmd (char *cmd) +{ + PKCHAR x_cmd[SZ_CMD+1]; + PKCHAR nullstr[1]; + XINT status; + extern int ZOSCMD(); + + + strncpy ((char *)x_cmd, cmd, SZ_CMD); + nullstr[0] = 0; + + /* Terminate the parent process if the OS command is interrupted. + */ + ZOSCMD (x_cmd, nullstr, nullstr, nullstr, &status); + return (status); +} |