Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)
osh(1) OSS Shell and Utilities Reference Manual
10. Running the osh process programmatically from a Guardian environment C program:
void main( void )
{
short myprocesshandle[ 10 ];
char myterm[ 64 ];
short mytermlen;
char cmd[ 255 ];
/* Get the home terminal name */
PROCESSHANDLE_NULLIT_( myprocesshandle );
PROCESS_GETINFO_( myprocesshandle ,
/* filename */, /* filenamemaxlen */,
/* filenamelen */, /* pri */, /* mom */,
myterm, ( short )( sizeof ( myterm ) - 1),
&mytermlen );
myterm[ mytermlen ] = ’\0’;
/* Build the command line */
sprintf ( cmd, "osh / IN %s, OUT %s / -c \"%s \"",
myterm, myterm, shcmd );
system ( cmd );
exit ( 0 );
}
where shcmd is any valid OSS shell command.
6−104 Hewlett-Packard Company 527188-021