POSIX SIGNALS + OCI

Hi,
I'm working with OCI in a multithreaded program, not oci, just posix threads.
Besides this, i need to set up a signal handler for SIGPIPE, and y noticed after implemented OCI calls that OCI is somehow bloking or reinstalling a handler not only for SIGPIPE, but for SIGINT too... I cant terminate my app from the console with crlt + C now, for example.
Does anyone knows or experienced with these kind of problems using OCI in linux?
Thanks a lot if u can help me.! .

The functions you are looking for are osnsui() and osncui(). These functions register your own signal handler with Oracle.
The only documentation I have been able to find is in the Administrator's Reference for UNIX Systems, chapter 4, "Using Oracle Precompilers and the Oracle Call Interface" sub-heading "Using Signal Handlers"
HTH,
Robert Fayle

Similar Messages

  • Sending POSIX signal to an external subprocess from a java program

    I'm programing in forte for java under linux-mandrake, I've execute an external subprocess with the runtime and Process clases, I need to send the 2� POSIX signal to this external subprocess, I mean de SIGINT signal, I know that you can send a signal from a shell just doing:
    Kill -2 pid // the SIGINT signal is the 2 POSIX signal
    I know that there is another system-call like : kill(int signal, int pid) that any one can send from a c program.
    Althought I don't know how can I get the pid of a suprocess, because I Know that there is the systemcall in c like:
    int getpid() wich gives the pid of the current process, but I need to have the pid of a subprocess not the current one.
    The thing is that I do not know how can I do it from a java program, I mean that to send a signal to a subprocess it will work using system-calls, but I do not know if I can insert system call in a java program, I've been thinking about doing it using a linux script like:
    #!bin/bash
    $a = pidof /home/maude-linux/bin/maude.linux
    # this is the path of the process wich is running
    kill -2 a$
    and the run this script from a java program doing an exec(sh script.bin)
    but by the moment I must be doing something wrong in the script because I find mistake in it, it gives me mistake in the assign sentence , I mean:
    $a = pidof /home/maude-linux/bin/maude.linux
    # this is the path of the process wich is running
    I'm not used to program shell scripts, perhaps I'm doing something wrong, is there something wrong in this sentence?.
    I would aprecciate some help about this, or if somebody have some idea how to do it in java, I repeat I need to send a signal to a external subprocess wich is launched from a java program by the process and runtime clases, and I need to send a SIGINT signal to the subprocess, I hope that some body can give some suggestion or some code explaining the situation

    Are the portions of bash-code verbatim in your post?
    When yes, they look suspicious!
    Instead of
    #!bin/bash
    #!/bin/bash
    would be better.
    $a = pidof /home/maude-linux/bin/maude.linux
    does not look good either.
    If you have command "pidof" telling the pid based on the path name of the executable passed to it as its argument, you can have the output of this program in a shell script like this:
    a=$( pidof /home/maude-linux/bin/maude.linux )
    Then through $a you will refer to the value of the variable "a":
    kill -SIGINT $a
    A pidof script could look like this (apart from error handling):
    ps -ef|awk '{if (NF>=8 && $8=="'"$1"'") print $2;}'
    This works for me; your mileage may vary.

  • Catching POSIX signals with labview

    Hi,
    is there a way to catch POSIX signals with LabVIEW.
    Im building a LabVIEW Client (Linux AND Windows) to a non LV Server
    (Linux, C). All works fine except the catching of the interrupts sent
    by the server. The server sends interupts using POSIX signals. For full
    functionality I should be able to catch this signals. How can I do
    that?
    Thanks for your help
    Ulrich

    Interesting project!
    I looks like a few people have tackled decoding the data (both WWV and WWVB) using reciever modules that create a digital signal stream and Arduinos to decode the data.
    How about GPS based time? Here is reciever/decoder module that provides a decoded serial data stream:
    http://www.parallax.com/Portals/0/Downloads/docs/prod/acc/GPSManualV1.1.pdf
    -AK2DM
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

  • Handling POSIX signals in AIR

    Is there any way to handle signals on POSIX platforms in AIR? I'm developing a kiosk application with AS3 for AIR that will run on Linux and some features would be easier to do if I could handle the signals from the OS (-HUP, -INT, etc).
    If not, is there any other way to listen for events from other applications or the OS. Like for example send a signal to AIR app to reload configuration after it's been updated.

    How about using a native process as a bridge to your AIR application ? You can implement stub handlers in your native process just to send messages to the AIR application. The fact that you need to signal the spawned process instead of your AIR application may be of course a drawback, depending on your implementation. As for the interface with other applications, the first thing that comes to my mind is using sockets.

  • How to trap (interrupt) signal from JVM

    How to capture (interrupt) signal from JVM in case of JVM termination due to Error/RuntimeException in shell script (Unix/Linux OS). Is it possible?
    I am executing an java class from shell script. In cetain condition it throws RuntinmeException.
    I want to capture the signal from terminating JVM in case of the RuntimeException.
    How to acheive this ? Can any one solve this problem ?

    Hi
    Using the POSIX signal java program , We can trap the JVM signals.
    Addition info
    Use sun.misc.SignalHandler - interface
    and MEthod sun.misc.Signal.handle( new sun.misc.Signal(signalName), this );

  • I am not able to install screen-git from the aur

    So yeah, i cant install screen-git from the aur. Im using yaourt.
    ┌─[yamifrankc]──(~)
    └─| % > aur -S screen-git
    ==> Resuming previous build
    ==> Downloading screen-git PKGBUILD from AUR...
    tar: Record size = 13 blocks
    ==> Last 5 comments ordered by date (asc):
    Comment by: dolby on Tue, 16 Jun 2009 15:02:25 +0000
    GNU screen shouldnt depend on libelf. Package in extra now doesnt.
    See http://bugs.archlinux.org/task/14700
    Comment by: dolby on Tue, 16 Jun 2009 15:03:08 +0000
    Oh yeah, gpm isnt a dependency either.
    Comment by: nihathrael on Tue, 16 Jun 2009 16:23:56 +0000
    Thanks for the pointers. Package updated.
    Comment by: firecat53 on Tue, 16 Jun 2009 23:19:28 +0000
    At least for x86_64, libelf seems to be a dependency. Throws an error about libelf.so.0 when starting screen if it's not installed.
    Comment by: Ranguvar on Sun, 11 Oct 2009 04:00:10 +0000
    The three lines at the end of the install scriplet are unnecessary now and can cause problems apparently, please remove :)
    Also, I cannot confirm libelf dependency, both by using ldd and trying removing libelf, so it should be kept out.
    First Submitted: Sun, 09 Nov 2008 15:43:42 +0000
    screen-git 20090616-1 : GNU Screen from GIT repository. Provides vertical splitting.
    ( Unsupported package: Potentally dangerous ! )
    ==> Edit the PKGBUILD (highly recommended for security reasons) ? [Y/n]("A" to abort)
    ==> ----------------------------------------------
    ==>n
    ==> screen-git dependencies:
    - ncurses (already installed)
    - shadow (already installed)
    - git (already installed)
    - automake (already installed)
    - autoconf (already installed)
    ==> WARNING: This PKGBUILD contains install file that can be dangerous.
    screen.install
    ==> Edit screen.install (highly recommended for security reasons) ? [Y/n] ("A" to abort)
    ==> ----------------------------------------------
    ==>y
    Please add EDITOR to your environment variables
    for example:
    ==> Edit PKGBUILD with:(replace gvim with your favorite editor)
    ==> Edit screen.install with:vim
    ==> WARNING: This PKGBUILD contains install file that can be dangerous.
    screen.install
    ==> Edit screen.install (highly recommended for security reasons) ? [Y/n] ("A" to abort)
    ==> ----------------------------------------------
    ==>n
    ==> Continue the building of screen-git ? [Y/n]
    ==> ----------------------------------------------
    ==>y
    ==> Install or build missing dependencies for screen-git:
    ==> Building and installing package
    mkdir: cannot create directory `/var/abs': Permission denied
    ==> WARNING: Unable to write in /var/abs/local/yaourtbuild/screen-git directory. Using /tmp directory
    ==> screen-git dependencies:
    - ncurses (already installed)
    - shadow (already installed)
    - git (already installed)
    - automake (already installed)
    - autoconf (already installed)
    ==> Determining latest git revision...
    -> Version found: 20091204
    ==> Making package: screen-git 20091204-1 i686 (Fri Dec 4 07:43:16 CST 2009)
    ==> Checking Runtime Dependencies...
    ==> Checking Buildtime Dependencies...
    ==> Retrieving Sources...
    -> Found screen.pam in build dir
    ==> Validating source files with md5sums...
    screen.pam ... Passed
    ==> Extracting Sources...
    ==> Removing existing pkg/ directory...
    ==> Entering fakeroot environment...
    ==> Starting build()...
    ==> Connecting to GIT server....
    Already up-to-date.
    ==> The local files are updated.
    ==> GIT checkout done or server timeout
    ==> Starting make...
    autoheader: WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
    autoheader: WARNING: and `config.h.top', to define templates for `config.h.in'
    autoheader: WARNING: is deprecated and discouraged.
    autoheader:
    autoheader: WARNING: Using the third argument of `AC_DEFINE' and
    autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows one to define a template without
    autoheader: WARNING: `acconfig.h':
    autoheader:
    autoheader: WARNING: AC_DEFINE([NEED_FUNC_MAIN], 1,
    autoheader: [Define if a function `main' is needed.])
    autoheader:
    autoheader: WARNING: More sophisticated templates can also be produced, see the
    autoheader: WARNING: documentation.
    configure: WARNING: unrecognized options: --with-sys-screenrc
    this is screen version 4.1.0
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking how to run the C preprocessor... gcc -E
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking whether gcc needs -traditional... no
    checking for library containing strerror... none required
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking minix/config.h usability... no
    checking minix/config.h presence... no
    checking for minix/config.h... no
    checking whether it is safe to define __EXTENSIONS__... yes
    checking for gawk... gawk
    checking for a BSD-compatible install... /bin/install -c
    configure: checking for buggy tools...
    - sh is 'GNU bash, version 4.0.35(2)-release (i686-pc-linux-gnu)'.
    - sed is 'GNU sed version 4.2.1'.
    checking if a system-wide socket dir should be used... yes
    checking for the socket dir... (eff_uid ? "/tmp/uscreens" : "/tmp/screens")
    configure: checking for MIPS...
    configure: checking for Ultrix...
    configure: checking for butterfly...
    configure: checking for POSIX.1...
    - you have a POSIX system
    configure: checking for System V...
    configure: checking for sequent/ptx...
    configure: checking SVR4...
    checking stropts.h usability... yes
    checking stropts.h presence... yes
    checking for stropts.h... yes
    checking for string.h... (cached) yes
    checking for strings.h... (cached) yes
    configure: checking for Solaris 2.x...
    configure: checking BSD job jontrol...
    - you have jobcontrol
    configure: checking setresuid...
    configure: checking setreuid...
    configure: checking seteuid...
    configure: checking select...
    configure: checking fifos...
    - your fifos are usable
    configure: checking for broken fifo implementation...
    - your implementation is ok
    configure: checking sockets...
    - your sockets are usable
    configure: checking socket implementation...
    - you are normal
    - both sockets and fifos usable. let's take sockets.
    configure: checking select return value...
    - select is ok
    configure: checking for tgetent...
    configure: checking libcurses...
    - you use the terminfo database
    configure: checking ospeed...
    configure: checking for /dev/ptc...
    configure: checking for SVR4 ptys...
    checking for getpt... yes
    configure: checking for ptyranges...
    configure: checking default tty permissions/group...
    checking for write... /usr/bin/write
    checking for xterm... /usr/bin/xterm
    - pty mode: 0620, group: 0
    configure: checking getutent...
    configure: checking ut_host...
    checking utempter.h usability... no
    checking utempter.h presence... no
    checking for utempter.h... no
    configure: checking for libutil(s)...
    configure: checking getloadavg...
    assuming posix signal definition
    configure: checking for crypt and sec libraries...
    configure: checking crypt...
    configure: checking IRIX sun library...
    configure: checking syslog...
    configure: checking wait union...
    configure: checking for termio or termios...
    configure: checking getspnam...
    configure: checking getttyent...
    configure: checking fdwalk...
    configure: checking whether memcpy/memmove/bcopy handles overlapping arguments...
    checking for long file names... yes
    checking for vsprintf... yes
    checking for dirent.h that defines DIR... yes
    checking for library containing opendir... none required
    checking for setenv... checking for nl_langinfo(CODESET)... yes
    checking for library containing gethostname... none required
    checking for rename... yes
    checking for fchmod... yes
    checking for fchown... yes
    checking for strerror... yes
    checking for lstat... yes
    checking for _exit... yes
    checking for utimes... yes
    checking for vsnprintf... yes
    checking for getcwd... yes
    checking for setlocale... yes
    checking for strftime... yes
    checking for PAM support... yes
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating doc/Makefile
    config.status: creating config.h
    config.status: config.h is unchanged
    config.status: executing default commands
    configure: WARNING: unrecognized options: --with-sys-screenrc
    Now please check the pathnames in the Makefile and in the user
    configuration section in config.h.
    Then type 'make' to make screen. Good luck.
    CPP="gcc -E -DETCSCREENRC='"/usr/etc/screenrc"' -DSCREENENCODINGS='"/usr/share/screen/utf8encodings"'" srcdir=. sh ./osdef.sh
    AWK=gawk CC="gcc -march=i686 -mtune=generic -O2 -pipe" srcdir=. sh ./comm.sh
    gcc -c -I. -I. -DETCSCREENRC='"/usr/etc/screenrc"' -DSCREENENCODINGS='"/usr/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \
    -march=i686 -mtune=generic -O2 -pipe screen.c
    gcc -c -I. -I. -DETCSCREENRC='"/usr/etc/screenrc"' -DSCREENENCODINGS='"/usr/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \
    -march=i686 -mtune=generic -O2 -pipe ansi.c
    gcc -c -I. -I. -DETCSCREENRC='"/usr/etc/screenrc"' -DSCREENENCODINGS='"/usr/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \
    -march=i686 -mtune=generic -O2 -pipe fileio.c
    gcc -c -I. -I. -DETCSCREENRC='"/usr/etc/screenrc"' -DSCREENENCODINGS='"/usr/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \
    -march=i686 -mtune=generic -O2 -pipe mark.c
    gcc -c -I. -I. -DETCSCREENRC='"/usr/etc/screenrc"' -DSCREENENCODINGS='"/usr/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \
    -march=i686 -mtune=generic -O2 -pipe misc.c
    gcc -c -I. -I. -DETCSCREENRC='"/usr/etc/screenrc"' -DSCREENENCODINGS='"/usr/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \
    -march=i686 -mtune=generic -O2 -pipe resize.c
    gcc -c -I. -I. -DETCSCREENRC='"/usr/etc/screenrc"' -DSCREENENCODINGS='"/usr/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \
    -march=i686 -mtune=generic -O2 -pipe socket.c
    In file included from socket.c:51:
    extern.h:159: error: conflicting types for 'execvpe'
    /usr/include/unistd.h:585: note: previous declaration of 'execvpe' was here
    make: *** [socket.o] Error 1
    ==> ERROR: Build Failed.
    Aborting...
    Error: Makepkg was unable to build screen-git package
    Vertical split is ftw! What can i do to build it?

    yeah, i also got that message.
    for vertical split you can go for screen-vs package. this is screen with the vs patch.
    http://aur.archlinux.org/packages.php?ID=6006

  • Scheduled Stored Procedures...

    Hey All,
    11gR2 Enterprise -
    Oracle Linux
    All the bells and whistles
    So the question is about running stored procedures via the scheduler.
    In the scheduler you can set all sorts of limits repeat time etc.  You can even have the scheduler stop the procedure it runs more than n minutes.
    My question is this:
    Is there any way anyone has discovered for the SP to be aware that it is being terminated for some reason?
    For example in the *nix environment most all programs written have access to the POSIX signals and thereby provide a method of gracefully shutting  down, saving a status etc.  by catching SIGINT, SIGTERM, SIGHUP etc. and if they fail to heed those signals you can of course unconditionally terminate them with a kill -9 [pid].
    My reason for this is that I want to schedule a run of a stored procedure every 15 minutes, but if it takes more then 5 minutes to complete I want it to shutdown.
    Thanks in advance.

    Hmmm perhaps you did not notice the question:
    Yes - I noticed the question. But then you said only that 'if it takes more then 5 minutes to complete I want it to shutdown.'. And since it will be shutdown that reason seemed to conflict with the question you ask.
    Not trying to argue - just trying to get things clarified. If you reread your original thread and then reread what you just said it is pretty clear that your last response provided actual reasons for wanting to 'intercept' the shutdown.
    Unfortunately there is no such messaging between procedures and Oracle processes unless the procedure initiates it. That is, the proc would need to check how long it has been running and do something to clean up and terminate itself. The problem there, of course, is that even a single query could run longer than 5 minutes and Oracle isn't going to return control to the procedure if the query exceeds some resource limit.
    So for the code to be effectively pro-active it would need to contain multiple 'batch' steps and perform a check between each step to see if it should continue or gracefully exit.
    We do that sort of 'proactive' check all the time in nightly or weekend batch processing when it is important that processes not run beyond a certain time window.
    But as just mentioned earlier it can never be exact because only the user's code can/will do the check.

  • Extendscript documentation finally available

    Direct link: http://help.adobe.com/en_US/framemaker/scripting/framemaker_10_scripting.pdf
    Also, please see the blog at:
    http://blogs.adobe.com/tcs/2011/08/extendscript-estk/new-f-10-estk-doc.html

    david.dickinson wrote:
    these things ... would be documented in VM specific documentationI have the Sun documentation for the Sun VM. And I can't find anything that lists the happenings that Sun supports (other than the Posix signal handlers). If that's all there is at the moment, then fine. But it's not clear from the documentation at the moment. A line in the docs that said "The Sun VM does not define any external happenings other than the following Posix signal handlers" would be more explicit, and would have saved me from looking for things that might not even be there :-)
    Again, if this is documented somewhere, and I'm just being dim, then a pointer to the correct source would be appreciated.There is no explicit documentation, I'll make a note to add it to one of the docs.
    >
    There is no API ... no pre-defined set of happenings ... no standardized names for which to askI take your point. But the regular VM allows you to do things like query the list of Memory Managers and Memory Pools and return their names - and as far as I am aware, the names for those things aren't standardised. So it could be done. The VM is generally very good about providing quite rich information on the runtime environment, which is why I thought there might be a simple JMX-style api to list the supported happenings. More idle curiosity than anything else :-)I meant from the perspective of the RTSJ, there's no API defined.
    If we supported happenings then we could of course make them discoverable/accessible via an appropriate management bean.
    David Holmes

  • [FIXED] mplayer not using SSE?

    Thats what i have when i play anything:
    Cannot test OS support for SSE, disabling to be safe.
    Can i do something about?
    Last edited by kokoko3k (2013-06-13 15:19:50)

    mplayer2 works as expected:
    Detected cache-line size is 64 bytes
    Testing OS support for SSE... yes.
    ...that's weird
    -edit
    i toke a look to the coudetect.c file (the message and tests about sse are there) of both mplayer and mplayer2, and compiled both with the same file (discarding the changes done by mplayer2, but the result is the same.
    Also, it seems that for some reason all lies here:
    if defined(_POSIX_SOURCE)
    struct sigaction saved_sigill;
    //kokoko3k:
    mp_msg(MSGT_CPUDETECT,MSGL_V, "IF YOU READ ME, POSIX SOURCE IS DEFINED " );
    /* Save the original signal handlers.
    sigaction( SIGILL, NULL, &saved_sigill );
    signal( SIGILL, (void (*)(int))sigill_handler_sse );
    /* Emulate test for OSFXSR in CR4. The OS will set this bit if it
    * supports the extended FPU save and restore required for SSE. If
    * we execute an SSE instruction on a PIII and get a SIGILL, the OS
    * doesn't support Streaming SIMD Exceptions, even if the processor
    * does.
    if ( gCpuCaps.hasSSE ) {
    mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " );
    // __asm__ volatile ("xorps %%xmm0, %%xmm0");
    __asm__ volatile ("xorps %xmm0, %xmm0");
    mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" );
    /* Restore the original signal handlers.
    sigaction( SIGILL, &saved_sigill, NULL );
    /* If we've gotten to here and the XMM CPUID bit is still set, we're
    * safe to go ahead and hook out the SSE code throughout Mesa.
    mp_msg(MSGT_CPUDETECT,MSGL_V, "Tests of OS support for SSE %s\n", gCpuCaps.hasSSE ? "passed." : "failed!" );
    #else
    /* We can't use POSIX signal handling to test the availability of
    * SSE, so we disable it by default.
    mp_msg(MSGT_CPUDETECT,MSGL_WARN, "Cannot test OS support for SSE, disabling to be safe.\n" );
    gCpuCaps.hasSSE=0;
    #endif /* _POSIX_SOURCE */
    mplayer say that _POSIX_SOURCE is not defined; mplayer2 seems to get it.
    -EDIT-
    I went deeper into this and found that _POSIX_SOURCE is defined in /usr/include/features.h
    -EDIT-
    Seems not to be a packaging issue but a mainstream one; i used the previous PKGBUILD ewith the current mplayer snapshot and the bug is still there.
    I guess that as soon as mplayer2 will get the current changes it will be affected too.
    Last edited by kokoko3k (2013-06-07 12:38:17)

  • IPhone exception handling

    Where is the recommended method of iPhone exception handling documented? Is it using Cocoa @try @catch() blocks? NS_HANDLER macros? Posix signals? Or something else? Thanks.

    Hi Jayakrishna,
    In General , there are non execptions in BAPIs, because of the reason, that the exception raised in a SAP envoronment may not mean anything for a non SAP initiator. All the exception situations would only fill the return table(TYpe BAPIRET2 or something like that). If you read that table after the call to the bapi, you can understand what has gone wrong.
    Regards,
    Ravi

  • OCI 11gR2 Trapping Linux Signals

    Greetings,
    Is there any documentation that might allude to any possible changed signal behavior with OCI for 11gR2 on Linux platform?
    We currently have handlers that call abort() as well as dedicated SEGV and other handlers that are appearing to be broken when run as background processes when linked with Oracle 11gR2 OCI libraries. This would be under RH 5.4 and using Oracle Client for 11gR2. For example, when we call abort(), no core is dropped in certain background processes. If we first set the default handler- either through signal SIG_DFL or with sigaction prior to calling abort(), this drops a core as expected. If we link with other libraries, this problem also goes away.
    What we really need is some way to ensure cores are dropped or what to setup to collect cores. Our work-around for abort() works for those occasions, but we're now losing executables with no trace and no core to be found only when linking with OCI 11gR2 libraries.
    Any insights greatly appreciated! Thank you!
    Edited by: 785338 on Jul 29, 2010 6:00 PM

    See also: Re: Oracle-DB-Client 11R2 with perl-DBD: Eating Signal CTRL-C
    Edited by: Ulrich Weiss on May 4, 2011 1:53 AM

  • Posix timer sends synchronous signals?

    I want to handle a timer event in a thread instead of a signal handler by using sigwait. However, the thread waiting on the signal (SIGRTMIN) doesn't recieve the timer signal set by timer_settime and the program aborts with SIGRTMIN. If I modify the program to not set the timer and I send SIGRTMIN asyncronously using kill at the command line, then the thread receives it. This leads me to conclude that timer_settime() generates syncronous signals, as syncronous sigs which are not caught by a sig handler abort the program. But this cannot be correct behavior; it defeats the purpose of having sigwait() available. (It also contradicts the suggested usage mentioned in the man page for thr_sigsetmask()). Anyone else have this problem? I'm using Solaris 8/SPARC.
    Here is a simple program that is SUPPOSED to print 'got it!!' once per second, based on timer expirations. Due to the strange behavior of timer_settime(), it instead simply aborts with SIGRTMIN.
    I compiled it with cc sigtest.c -lrt -lthread. Any advice on how to get this working? Please pardon the indentation. Thanks.
    /* sigtest.c */
    #include <stdio.h>
    #include <stdlib.h>
    #include <pthread.h>
    #include <signal.h>
    #include <time.h>
    pthread_t handler_thrid;
    sigset_t blocked_sigs;
    timer_t timerid;
    struct sigevent sigspec;
    struct itimerspec timer_spec;
    void handler_thr(void a)
    int sig;
    sigset_t set;
    printf("handle thr created\n");
    sigemptyset(&set);
    sigaddset(&set, SIGRTMIN);
    while (1)
    sigwait(&set);
    printf("got it!!\n");
    int main()
    /* block SIGRTMIN */
    pthread_sigmask(0, 0, &blocked_sigs);
    sigaddset(&blocked_sigs, SIGRTMIN);
    pthread_sigmask(SIG_BLOCK, &blocked_sigs, NULL);
    /* create timer that sends SIGRTMIN */
    sigspec.sigev_notify = SIGEV_SIGNAL;
    sigspec.sigev_signo = SIGRTMIN;
    timer_create(CLOCK_REALTIME, &sigspec, &timerid);
    /* start thread */
    pthread_create(&handler_thrid, NULL, handler_thr, NULL);
    /* start timer */
    timer_spec.it_value.tv_sec = 1;
    timer_spec.it_value.tv_nsec = 0;
    timer_spec.it_interval.tv_sec = 1;
    timer_spec.it_interval.tv_nsec = 0;
    timer_settime(timerid, 0, &timer_spec, NULL);
    pthread_join(handler_thrid, NULL);

    The combination of adding higher_tick=1 to /etc/system + coding timer_create(CLOCK_HIGHRES) in our application appears to
    fix the problem. The app,however, can only be run as root now.
    Interestingly, non-posix timers work on Solaris 10.
    Is there an "upgrading your app from Solaris 8 to 10" web-site out there?

  • Signal Handling Issue with OCI

    Greetings.
    I have a library using OCI with Oracle 10g.
    I am not doing any signal handling inside the library.
    I have realized after a connection is made to Oracle 10g server and successfully terminated, the ctrl+Z signal (SIGTSTP) would not be honored. If I use the same library and make no connection to database, then the signal is honored. Other signals such as SIGINT etc are OK even if I make connections to database server.
    Operations that I do using OCI are simple:
    1- initialization of context (standard env creation, set attributes, handle allocation etc)
    2- making connection
    3- inserting using SQL insert method (statement prep, defineByPos, execute)
    4- simple selection of last value of a sequence (statement prep, defineByPos, execute)
    5- clean up (OCISessionEnd, OCIServerDetach,and freeing handles)
    Again, I have no signal handling inside the library. I am using this over Solaris OS and the functionality is correct except for this signal issue.
    My questions:
    1- Is this a known issue or is this something that has been seen before?
    2- what sort of signal handling is in OCI that could potentially impact my app?
    3- Is there any solution that you could suggest?
    thank you in advance.

    I'm trying to migrate from oracle 9i HP unix to oracle 10G AIX5.3
    I'm trying to create a connection pool. Then create Many threads, with each of these
    performing an OCI Session Get at thread initialization.
    Then handing the threads work to perform on their existing OCI session to the connectionpool.
    Same thing was working fine in oracle 9i but if I try to do the same in oracle 10G seems to get locked up,
    unless the sessionget/sessionrelease are in the same working
    thread subroutine. I am trying to avoid getting a session and releasing for each unit of
    work.Instead I'd like to acquire a bunch of session against the connection pool.And then have the threads (with persistent sessions) perform periodic work....
    If utilizing a get/work/release all in the same thread and subroutine call.Then everything works, except performance is very poor.
    please find the function I'm using to achive the same.
    Experts please help me ,I'm totally struck here....
    int ConnectionOpen (Connection conn, char username, char password, char server) {
    ** Functionality : Opens a new session with Oracle.
    ** Parameters : conn - pointer to the struct Connection. It is an output parameter
    ** returns the handle to the new session.
    ** username - pointer to the char array has username.
    ** password - pointer to the char array has password.
    ** server - pointer to the char array has database name.
    ** Returns 0 on success, 1 on success with information and non-zero value on error.
    int status = 0;
    boolean sesfnd;
    text errbuf[512];
    sb4 errcode = 0;
    if (!conn) return OCI_INVALID_HANDLE;
    if (!strcasecmp (USE_SESS_POOL, "YES"))
    /* PLC44050021 Session Pool Changes*/
    if (conopen==0)
    status = OCIEnvCreate((OCIEnv **) &envhp, OCI_THREADED,
    (dvoid *)0, (dvoid *(*)(dvoid *, size_t))0,
    (dvoid *(*)(dvoid *, dvoid *, size_t))0, (void (*)(dvoid *, dvoid *))0,
    (size_t)0, (dvoid**)0);
    if (status != 0 && status != 1) return status; /*error in creating environment*/
    status = OCIHandleAlloc((dvoid *)envhp,
    (dvoid **)&errhp,
    OCI_HTYPE_ERROR,
    (size_t)0,
    (dvoid **)0);
    if ( status != 0 && status != 1 ) return status; /*error in allocating error handler*/
    status = OCIHandleAlloc((dvoid *)envhp,
    (dvoid **)&authp,
    OCI_HTYPE_AUTHINFO,
    (size_t)0,
    (dvoid **)0);
    if ( status != 0 && status != 1 ) return status; /*error in allocating error handler*/
    status = OCIHandleAlloc((dvoid *)envhp,
    (dvoid **) &poolhp,
    OCI_HTYPE_SPOOL,
    (size_t)0,
    (dvoid **)0);
    if ( status != 0 && status != 1 ) return status; /*error in allocating CPOOL Handler*/
    status = OCISessionPoolCreate((OCIEnv*)envhp,
    (OCIError*)errhp,poolhp,
    &poolName, (ub4*)&poolNameLen,
    (text*)server, (ub4)strlen(server),
    sessMin, sessMax, sessIncr,
    (text*)username, (ub4)strlen(username),
    (text*)password, (ub4)strlen(password),
    OCI_DEFAULT) ;
    if ( status != 0 && status != 1 ) return status;
    conn->envhp=(OCIEnv*)envhp;
    conn->errhp=(OCIError*)errhp;
    status=OCIAttrSet((dvoid *)authp,(ub4) OCI_HTYPE_AUTHINFO,
    (text*)username, (ub4)strlen(username),
    (ub4) OCI_ATTR_USERNAME, (OCIError*)conn->errhp);
    if ( status != 0 && status != 1 ) return status;
    status=OCIAttrSet((dvoid *) authp,(ub4) OCI_HTYPE_AUTHINFO,
    (text*)password, (ub4)strlen(password),
    (ub4) OCI_ATTR_PASSWORD, (OCIError*)conn->errhp);
    if ( status != 0 && status != 1 ) return status;
    status = OCISessionGet((OCIEnv*)conn->envhp,
    (OCIError*)conn->errhp,
    (OCISvcCtx**)&(conn->svchp),
    authp,
    (OraText *)poolName, (ub4)strlen((char*)poolName),
    (OraText *)"", (ub4)0,
    NULL, NULL,
    0,
    OCI_SESSGET_SPOOL);
    if ( status != 0 && status != 1 ) return status;
    conopen=1;
    /******* if the session pool is already established, reuse sessions out of it ********** /
    else
    conn->errhp=(OCIError*)errhp;
    conn->envhp=(OCIEnv*)envhp;
              /******* Hanging in this call ********** /
    status = OCISessionGet((OCIEnv*)conn->envhp,
    (OCIError*)conn->errhp,
    (OCISvcCtx**)&(conn->svchp),
    authp,
    (OraText *)poolName, (ub4)strlen((char*)poolName),
    (OraText *)"", (ub4)0,
    NULL, NULL,
    0,
    OCI_SESSGET_SPOOL);
    if ( status != 0 && status != 1 ) return status;
    else
    status = OCIEnvCreate((OCIEnv **) &conn->envhp, (ub4)OCI_DEFAULT,
    (dvoid *)0, (dvoid *(*)(dvoid *, size_t))0,
    (dvoid *(*)(dvoid *, dvoid *, size_t))0, (void (*)(dvoid *, dvoid *))0,
    (size_t)0, (dvoid**)0);
    if (status != 0 && status != 1) return status; /*error in creating environment*/
    status = OCIHandleAlloc((dvoid *)conn->envhp, (dvoid **)&conn->errhp, OCI_HTYPE_ERROR, (size_t)0, (dvoid **)0);
    if ( status != 0 && status != 1 ) return status; /*error in allocating error handler*/
    status = OCILogon((OCIEnv*)conn->envhp, (OCIError*)conn->errhp, (OCISvcCtx**)&(conn->svchp),
    (text*)username, (ub4)strlen(username),
    (text*)password, (ub4)strlen(password),
    (text*)server, (ub4)strlen(server));
    return status;
    }

  • How to convert from Finder Object reference to POSIX path

    I'm new to AppleScript. I'm super close to getting what I need done, but I've ran across a snag in the middle.
    The error I'm getting is Can’t make quoted form of POSIX path of item 1 of {«class docf» \"filename\" of «class cfol» \"foldername\" of «class cfol» \"Desktop\" of «class cfol» \"Username\" of «class cfol» \"Users\" of «class sdsk» of application \"Finder\"} into type Unicode text. the problem area is highlighted and notated below. I've looked all around online but can't find what I need.
    Thanks in advance for any and all help!
    set text item delimiters to "."
    tell application "Finder"
      set theFilestoChoose to every item of (choose file with prompt "Please select the file(s) you would like to move and rename" with multiple selections allowed) as list
      display dialog "Would you like to move these files to an existing folder and then rename them, or create a new folder and then rename them?" buttons {"Move to an existing folder and rename", "Create a new folder and rename"}
      if result = {button returned:"Move to an existing folder and rename"} then
      set firstnewname to "Aauuttoommaattoorr"
      repeat with index from 1 to the count of theFilestoChoose
      set theFilesChosenbeingrenamedfirsttime to item index of theFilestoChoose
      set filenamecount to text items of (get name of theFilesChosenbeingrenamedfirsttime)
      if number of filenamecount is 1 then
      set fileextension to ""
      else
      set fileextension to "." & item -1 of filenamecount
      end if
      set the name of theFilesChosenbeingrenamedfirsttime to firstnewname & index & fileextension as string
      end repeat
      log theFilesChosenbeingrenamedfirsttime
      set choosingtheplacetomove to choose folder with prompt "Select the folder to move to"
      set thechosenfoldersname to name of folder choosingtheplacetomove -- sets the folder name as text
      set AppleScript's text item delimiters to {"-"}
      set Numberofthemonthatthebeginningofthefoldername to text item 1 of thechosenfoldersname as string -- for later to append the number back on without having to ask again!
      set shortenedname to text item 2 of thechosenfoldersname as string
      set the name of choosingtheplacetomove to shortenedname as string
      set thefolderstemporarynameaslocation to choosingtheplacetomove as string
      move theFilestoChoose to folder thefolderstemporarynameaslocation
      log theFilestoChoose
      set allfilesindestinationfolder to every file in choosingtheplacetomove as alias list --
      set aInitials to the text returned of (display dialog "Whose camera were this/these pictures taken on?" default answer "")
      set filteredList to my filterList(allfilesindestinationfolder, aInitials) as list
      log filteredList
      -- everything above this is correct so far and works perfect
      --TROUBLE SECTION BELOW
      set theSortedfilterList to (sort filteredList by creation date) -- something happens here with the theSortedfilterList that makes it unintelligible to convert to POSIX later. but I need the files in the order that this line puts them.
      log theSortedfilterList
      set timetorenamelasttime to theSortedfilterList
      set newbasename to shortenedname
      repeat with index from 1 to the count of timetorenamelasttime
      set theonefile to item index of timetorenamelasttime
      set theonefilenamecount to text items of (get name of theonetwothreefile)
      if number of theonefilenamecount is 1 then
      set fileextensionone to ""
      else
      set fileextensionone to "." & item -1 of theonefilenamecount
      end if
      tell application "System Events" to set CreaDate to creation date of file theonefile
      set CreaDate2 to CreaDate as text -- need to trim down to the first 10 characters and eliminate the "-"
      set AppleScript's text item delimiters to {""}
      set shorteneddatename to text items 1 thru 10 of CreaDate2 as string
      set the name of theonefile to shorteneddatename & {"-"} & newbasename & {"-"} & aInitials & {"-"} & index & fileextensionone as string
      end repeat
      --Trouble section above
      set the name of choosingtheplacetomove to Numberofthemonthatthebeginningofthefoldername & "-" & shortenedname as string -- returns the month prefix to the foldername
      else if result = {button returned:"Create a new folder and rename"} then
      set repeatConfirmation to true --Boolean to decided if script should be repeated; default is to repeat
      repeat while (repeatConfirmation = true) --Repeat if Any Tests Are Failed
      set thefirstquestion to choose from list {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"} with title "Event Month Selection" with prompt "Select the month in which the event started. Select only one month:"
      set theMonthAnswer to result
      if theMonthAnswer = false then --"For historical reasons, choose from list is the only dialog command that returns a result (false) instead of signaling an error when the user presses the “Cancel” button."
      set repeatConfirmation to false
      set exitingeventmonth to display dialog ("You are exiting selecting the event month phase of the program. You will need to manually fix this decision") buttons {"OK"} with title "Exiting Event Month Selection"
      if button returned of exitingeventmonth = "OK" then
      set theMonthAnswer to ""
      end if
      else
      set confirmationanswer to display dialog "You selected " & theMonthAnswer & ", is this correct? " buttons {"Yes, that's correct.", "No, the picture(s) are from a different month."} with title "Confirm Event Month Selection"
      if button returned of confirmationanswer = "Yes, that's correct." then
      set repeatConfirmation to false
      else
      display dialog ("That's okay, you can select another again!") buttons {"OK"} with title "Return to Event Month Selection"
      end if
      end if
      end repeat
      log theMonthAnswer
      if theMonthAnswer = "" then
      set monthtonumber to "You have cancelled this action."
      log monthtonumber
      else if theMonthAnswer = {"January"} then
      set monthtonumber to "01"
      log monthtonumber
      else if theMonthAnswer = {"February"} then
      set monthtonumber to "02"
      log monthtonumber
      else if theMonthAnswer = {"March"} then
      set monthtonumber to "03"
      log monthtonumber
      else if theMonthAnswer = {"April"} then
      set monthtonumber to "04"
      log monthtonumber
      else if theMonthAnswer = {"May"} then
      set monthtonumber to "05"
      log monthtonumber
      else if theMonthAnswer = {"June"} then
      set monthtonumber to "06"
      log monthtonumber
      else if theMonthAnswer = {"July"} then
      set monthtonumber to "07"
      log monthtonumber
      else if theMonthAnswer = {"August"} then
      set monthtonumber to "08"
      log monthtonumber
      else if theMonthAnswer = {"September"} then
      set monthtonumber to "09"
      log monthtonumber
      else if theMonthAnswer = {"October"} then
      set monthtonumber to "10"
      log monthtonumber
      else if theMonthAnswer = {"November"} then
      set monthtonumber to "11"
      log monthtonumber
      else if theMonthAnswer = {"December"} then
      set monthtonumber to "12"
      log monthtonumber
      end if
      set theNameofFoldertoMake to text returned of (display dialog "Please enter the name of the new folder you are creating:" default answer "" with title "New Folder Name")
      set LocationOfNewFolder to choose folder with prompt "Choose the location of the new folder you are creating:"
      set theNewNameofFoldertoMake to monthtonumber & "-" & theNameofFoldertoMake
      set newfolderaction to make new folder at LocationOfNewFolder with properties {name:theNewNameofFoldertoMake}
      move theFilestoChoose to newfolderaction
      end if
    end tell
    --function
    on filterList(allfilesindestinationfolder, aInitials)
      set patterns to {aInitials as string, "Aauuttoommaattoorr"}
      set output to {}
      repeat with aFile in the allfilesindestinationfolder
      repeat with aPattern in patterns
      set filepath to aFile as string
      if filepath contains aPattern then
      set end of the output to aFile
      exit repeat
      end if
      end repeat
      end repeat
      return output
    end filterList

    Okay, so you wanted the debugging and error messages. Thank you for the coaching. Here is what I get from the following line:
    set theSortedfilterList to (sort filteredList by creation date)
    log theSortedfilterList
    Log returns:
    (*document file Aauuttoommaattoorr3.AVI of folder SnowDay of folder Desktop of folder Username of folder Users of startup disk, document file Aauuttoommaattoorr2.MOV of folder SnowDay of folder Desktop of folder Username of folder Users of startup disk, document file Aauuttoommaattoorr1.mov of folder SnowDay of folder Desktop of folder Username of folder Users of startup disk*)
    set pxFile to POSIX path of ((theSortedfilterList) as alias)
    Error: "Can’t make {«class docf» \"Aauuttoommaattoorr3.AVI\" of «class cfol» \"SnowDay\" of «class cfol» \"Desktop\" of «class cfol» \"Username\" of «class cfol» \"Users\" of «class sdsk» of application \"Finder\", «class docf» \"Aauuttoommaattoorr2.MOV\" of «class cfol» \"SnowDay\" of «class cfol» \"Desktop\" of «class cfol» \" Username \" of «class cfol» \"Users\" of «class sdsk» of application \"Finder\", «class docf» \"Aauuttoommaattoorr1.mov\" of «class cfol» \"SnowDay\" of «class cfol» \"Desktop\" of «class cfol» \" Username \" of «class cfol» \"Users\" of «class sdsk» of application \"Finder\"} into type alias." number -1700 from {«class docf» "Aauuttoommaattoorr3.AVI" of «class cfol» "SnowDay" of «class cfol» "Desktop" of «class cfol» "Username" of «class cfol» "Users" of «class sdsk», «class docf» "Aauuttoommaattoorr2.MOV" of «class cfol» "SnowDay" of «class cfol» "Desktop" of «class cfol» "Username" of «class cfol» "Users" of «class sdsk», «class docf» "Aauuttoommaattoorr1.mov" of «class cfol» "SnowDay" of «class cfol» "Desktop" of «class cfol» "Username" of «class cfol» "Users" of «class sdsk»} to alias
    That is why I labeled it with Finder Object reference won’t return POSIX path, because I tried what was suggested about using the POSIX path of line. I thought seeing the lines above and around it would help set the context.
    So I need those files, but I need them sorted by creation date so that they’re in that order for the next renaming step.

  • Jdbc oci interface and xdb API for oracle 9.2.0.7

    I have a Java application that uses the jdbc oci interface to connect to an Oracle database and insert some XML into an XMLType column using the XDB APIs provided in xdb.jar.
    OS : IBM AIX version 5.1
    JVM : IBM 32-bit SDK pour AIX, Java 2 Technology Edition, version 1.4.2
    libraries used :
    ojdbc14.jar
    nls_charset12.jar
    xdb.jar
    xmlparserv2.jar
    libocijdbc9.so
    with Oracle 9.2.0.1 the application worked correctly. However we have just upgraded from Oracle 9.2.0.1 to Oracle 9.2.0.7 and now the JVM crashes when the XMLType.createXML(java.sql.Connection, java.lang.String) API is called. The error message is :
    JVMDG217: Dump Handler is Processing Signal 11 - Please Wait.
    JVMDG303: JVM Requesting Java core file
    JVMDG304: Java core file written to /<snip>/javacore2375690.1152115549.txt
    JVMDG215: Dump Handler has Processed Exception Signal 11.
    start.shl: 2375690 Segmentation fault(coredump)
    In the javacore file we find the lines :
    1XHSIGRECV SIGSEGV received at 0xdd7b7d6c in /<snip>/libocijdbc9.so. Processing terminated.
    ... <snip> ...
    "Thread-2" (TID:0x3030B4D8, sys_thread_t:0x75A8B128, state:R, native ID:0xA0C) prio=5
    4XESTACKTRACE at oracle.xdb.XMLType.createXMLTypeFromStringNative(Native Method)
    4XESTACKTRACE at oracle.xdb.XMLType.<init>(XMLType.java:518)
    4XESTACKTRACE at oracle.xdb.XMLType.createXML(XMLType.java:593)
    Does anyone have any ideas? Changing the version from 9.2.0.7 is not an option.
    Thanks,
    Dave Gosling.

    The 9.2.0.5 patchset, and all patchsets, are available for download from Metalink.
    There should be a rather large variety of JDBC drivers that will connect to an 9.2.0.5 database if that's what you're asking about.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

Maybe you are looking for

  • LT1423p not running at native resolution on Windows 8.1

    Hi, I have had the LT1423p touch mobile monitor for about 6 months and it was running fine with Windows 7 and my T440p notebook. Recently upgraded the notebook to Windows 8.1 and am having problems with the mobile monitor not running at 1600x900 reso

  • Help with uploading large video to ipad2

    Hi guys, I'm using the ipad 2 with camera connection kit to import videos from a Mobius camera which is working fine for videos less than a minute long but when I try to import anything larger (2 minute) it won't work? There is approx 6gig space on t

  • Backing up a windows 7 home premium laptop

    Hello, I have just purchased and installed a time capsule. It is being used wirelessly as my primary backup for my imac. I also have a windows 7 home premium laptop, and would like to back it up as well to the time capsule. I read about installing th

  • No BOM or BS found in B1 payload, check your BIU xsl

    i  have created b1POtob1so  with the intre gration  bisn tool i  got the message  from message log . what should i do. com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: com.sap.b1i.bizprocessor.BizProcException: BPE001 Nested exc

  • Logging with Web Start

    My log4j.properties files need to be on the classpath, and I have this working with the properties files in my deployed jar. But I want to have the log4j.properties file out side the jar and on the web server in the same directory as the jar so that