Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Call a shell by a procedure
Mik schrieb:
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
>
> int sh(char *);
> int sh( char *cmd )
> {
> int num;
> num = system(cmd);
> return num;
> }
>
If you rewrite you wrapper as
CREATE OR REPLACE FUNCTION Sp_Shell (cmd IN CHAR)
RETURN BINARY_INTEGER
AS EXTERNAL
NAME "sh"
LIBRARY shell_lib
LANGUAGE C
PARAMETERS (
cmd STRING, RETURN SHORT);
/
then you should be waiting until system call is completed.
Best regards
Maxim Received on Tue Sep 06 2005 - 10:41:14 CDT
![]() |
![]() |