Operating System - Tru64 Unix
1748202 Members
2927 Online
108759 Solutions
New Discussion юеВ

funcion system() does not finish !

 
Fedor Poradovsky
Occasional Advisor

funcion system() does not finish !

We installed latest patches of Oracle8i on Tru64 4.0E. After it we have problem with program. It stays frozen on c funcion "int system(str)" which does not finish.

We dit not change program, environment, operating system. This function is standard c library function. We do not understand the relation between oracle and sustem call.

Have somebody idea ? Thanks.
5 REPLIES 5
Erich Wimmer
Valued Contributor

Re: funcion system() does not finish !

The system() function passes the string parameter to the sh command, which
interprets string as a command and executes it. See sh(1) to determine
which command interpreter is defined by sh on your system.

The system() function invokes the fork() function to create a child process
that in turn uses theexec function to run sh, which interprets the shell
command contained in the string parameter. The current process waits until
the shell has completed before returning.

If you have patched Oracle, possibly the called shell (or script) may have been changed. Try to find out which sh command is hanging (f.e. by "ps" command).

Erich
Fedor Poradovsky
Occasional Advisor

Re: funcion system() does not finish !

Thak you for response.

I forget write that the program which hangs runs not as oracle. We did not change it and its environment, except ORACLE_HOME, however system() is not its part. Program runs under /usr/csh and I supposed that the fork() will create csh also. Now I do not know. However I mus say that the submited command is not in csh specific syntax, for ex. "ls -l".

The program when hanged has not child. So I do not know, if it hangs before fork() is executed or after child process finished.

Erich Wimmer
Valued Contributor

Re: funcion system() does not finish !

You should find out what will be called by the system() function. If this called script or program can be tested without using the calling process and disturbing your data, try it within the same environment.
You can also play arround with following short c-program, by changing the system call to your needs:
main()
{
if(system("sleep 10") < 0);
{
perror("system");
}
printf("after system-call\n");
exit(0);
}

Erich.
Fedor Poradovsky
Occasional Advisor

Re: funcion system() does not finish !

Thanks.

The simple program works.
Problem is with more complex programs with call to Oracle. We find that problem was in use of bad version of library file libjip8.so in $LD_LIBRARY_PATH. We did not find what we made bad in client installation. Which part of oracle installs this file.

Best regards
Fedor
Fedor Poradovsky
Occasional Advisor

Re: funcion system() does not finish !

thanks