/*
-char id_system[] = "@(#)system_.c 1.1";
+char id_system[] = "@(#)system_.c 1.4";
*
* execute a unix command
*
* command is a character string containing the command to be executed
*/
+#include "../libI77/fiodefs.h"
+#include "../libI77/f_errno.h"
+
+
long system_(s, n)
char *s;
long n;
{
- return((long)system(s));
+ char buf[256];
+ long i;
+
+ if (n >= sizeof buf)
+ return(-(long)(errno=F_ERARG));
+ for (i = 0; i < MXUNIT; i++)
+ flush_(&i);
+ g_char(s, n, buf);
+ return((long)system(buf));
}