64-bit sigaction() Signal Handler for aio_write()

I'm having trouble using a sigaction() specified signal handler when built as a 64 bit executable (-xarch=v9).
The siginfo_t argument gets passed to the signal handler just fine. The problem is with the si_value.sival_ptr member. The other members (sig, type, pid ) are all okay.
When built for 32-bits everything works fine.
When built for 64-bits all I get is the high 32-bits of the sival_ptr, the low 32-bits are always 0.
The signal is being generated as a result of a call to aoi_write().
Please help - I'm in a hurry and I can't seem to find the answer.
I can do a work-around using sival_int (it's in union with sival_ptr) and indexing a table for an address, but that's a hassle, while the pointer method is clean.
Any help will be appreciated.
Bruce.

Be careful that the program is built at compile time
with the correct 64-bit library and not inadvertantly
with a 32-bit version. The fact that the failure is
a seg-fault and dbx can't resolve the symbol make the
system lib a suspect and the problem a 32 bit vs.
64 bit version.

Similar Messages

  • How to find out the set handler for a particular signal?

    I have an interesting puzzle to solve. l'm investigating problems with someone else's code and I'd like to get the name of the handler that is set for SEGV. psig shows that the process catches SEGV, however I don't have access to the source code for all the libraries it links against and none of the source code I have sets a handler for SEGV. Is there a way to find out the name of the signal handler that is set for a particular signal in a process? I'm sure the source was compiled with cc -g. Solaris 8

    Hello Haritha,
    Please follow the path.
    Go to RSA1 -> Metadata Repository ->DataStore Objects(ODS) -> Find you DSO(ODS) there and click on that, you will get all the details(Queries, Objects - Char, Key figures, update rules,etc..) related to that particular DSO(ODS), same is the case for Cube as well.
    Please assign points.

  • [SOLVED] fglrx(0): [drm] failed to remove DRM signal handler

    Hello!
    I'm new to Arch so please forgive me if I'm asking about something obvious.
    After spending many hours on reading and comprehension of Arch philosophy I finally dared to install Arch 2007.08-02 (Don't Panic) on my computer Fortunately I was prepared for text-mode configuration, but obviously not prepared enough... My first major problem is with the X server. I have followed strictly the instructions from the wiki and installed xorg and catalyst drivers afterwards (for Radeon X800 Pro). Now probably something is wrong with my xorg.conf, which you can see below, but there's also a bit more sophisticated problem causing this type of message in /var/log/Xorg.0.log
    (II) fglrx(0): Shutdown CMMQS
    (EE) fglrx(0): [drm] failed to remove DRM signal handler
    (II) fglrx(0): [drm] removed 1 reserved context for kernel
    (II) fglrx(0): [drm] unmapping 8192 bytes of SAREA 0x2000 at 0xb7c78000
    (II) fglrx(0): [drm] Closed DRM master.
    I couldn't find a solution either on this board and on the web as well, so I dare to ask for a little tip what to do to solve this
    Thx in advance.
    P.S. My xorg.conf
    # Auto-generated by Archie mkxcfg
    Section "ServerLayout"
    Identifier "My Layout"
    Screen 0 "aticonfig-Screen[0]" 0 0
    InputDevice "Keyboard0" "CoreKeyboard"
    InputDevice "Mouse1" "CorePointer"
    EndSection
    Section "Files"
    # FontPath "/usr/share/fonts/75dpi:unscaled"
    # FontPath "/usr/share/fonts/75dpi"
    # Additional fonts: Locale, Gimp, TTF...
    # FontPath "/usr/share/lib/X11/fonts/latin2/75dpi"
    # FontPath "/usr/share/lib/X11/fonts/latin2/100dpi"
    # True type and type1 fonts are also handled via xftlib, see /etc/X11/XftConfig!
    # FontPath "/usr/share/fonts/Type1"
    RgbPath "/usr/share/X11/rgb"
    ModulePath "/usr/lib/xorg/modules"
    FontPath "/usr/share/fonts/misc:unscaled"
    FontPath "/usr/share/fonts/misc"
    FontPath "/usr/share/fonts/100dpi:unscaled"
    FontPath "/usr/share/fonts/100dpi"
    FontPath "/usr/share/fonts/PEX"
    FontPath "/usr/share/fonts/cyrillic"
    FontPath "/usr/share/fonts/ttf/western"
    FontPath "/usr/share/fonts/ttf/decoratives"
    FontPath "/usr/share/fonts/truetype"
    FontPath "/usr/share/fonts/truetype/openoffice"
    FontPath "/usr/share/fonts/truetype/ttf-bitstream-vera"
    FontPath "/usr/share/fonts/latex-ttf-fonts"
    FontPath "/usr/share/fonts/defoma/CID"
    FontPath "/usr/share/fonts/defoma/TrueType"
    EndSection
    Section "Module"
    # Load "ddc" # ddc probing of monitor
    # Load "type1"
    # Load "synaptics"
    Load "dbe"
    Load "dri"
    Load "extmod"
    Load "glx"
    Load "bitmap" # bitmap-fonts
    Load "freetype"
    # Load "record"
    EndSection
    Section "ServerFlags"
    Option "AllowMouseOpenFail" "true"
    EndSection
    Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    Option "XkbModel" "logiaccess"
    Option "XkbLayout" "pl"
    Option "XkbOptions" "compose:rwin"
    EndSection
    Section "InputDevice"
    Identifier "Mouse1"
    Driver "mouse"
    Option "Protocol" "ExplorerPS/2"
    Option "Device" "/dev/input/mouse1"
    Option "Buttons" "7"
    Option "ZAxisMapping" "4 5"
    Option "ButtonMapping" "1 2 3 6 7"
    EndSection
    Section "Monitor"
    Identifier "aticonfig-Monitor[0]"
    Option "VendorName" "ATI Proprietary Driver"
    Option "ModelName" "Generic Autodetecting Monitor"
    Option "DPMS" "true"
    EndSection
    Section "Device"
    Identifier "aticonfig-Device[0]"
    Driver "fglrx"
    EndSection
    Section "Screen"
    Identifier "aticonfig-Screen[0]"
    Device "aticonfig-Device[0]"
    Monitor "aticonfig-Monitor[0]"
    DefaultDepth 24
    SubSection "Display"
    Viewport 0 0
    Depth 24
    EndSubSection
    EndSection
    Section "DRI"
    Mode 0666
    EndSection
    Last edited by Zibi1981 (2008-02-20 10:49:20)

    Hello quad3d@work Thanks for the interest, but I've already solved this problem. I think it was something with my xorg.conf file, because when I made some changes to it, suddenly all started to work. If You are still interested in the output of the above command, well, here it is
    [zibi1981@felipe ~]$ cat ~/.xinitrc
    #!/bin/sh
    # ~/.xinitrc
    # Executed by startx (run your window manager from here)
    # exec gnome-session
    # exec startkde
    # exec startxfce4
    # exec icewm
    # exec openbox
    # exec blackbox
    # exec fluxbox
    # exec ratpoison
    # exec dwm
    # ... or any other WM of your choosing ...
    # exec xterm
    All the lines are commented, because I use Entrance with appropriate input in /etc/inittab file
    [zibi1981@felipe ~]$ cat /etc/inittab
    # /etc/inittab
    #  Runlevels:
    #    0    Halt
    #    1(S)       Single-user
    #    2    Not used
    #    3    Multi-user
    #    4    Not used
    #    5    X11
    #    6    Reboot
    ## Only one of the following two lines can be uncommented!
    # Boot to console
    #id:3:initdefault:
    # Boot to X11
    id:5:initdefault:
    rc::sysinit:/etc/rc.sysinit
    rs:S1:wait:/etc/rc.single
    rm:2345:wait:/etc/rc.multi
    rh:06:wait:/etc/rc.shutdown
    su:S:wait:/sbin/sulogin -p
    # -8 options fixes umlauts problem on login
    c1:2345:respawn:/sbin/agetty -8 38400 vc/1 linux
    c2:2345:respawn:/sbin/agetty -8 38400 vc/2 linux
    c3:2345:respawn:/sbin/agetty -8 38400 vc/3 linux
    c4:2345:respawn:/sbin/agetty -8 38400 vc/4 linux
    c5:2345:respawn:/sbin/agetty -8 38400 vc/5 linux
    c6:2345:respawn:/sbin/agetty -8 38400 vc/6 linux
    ca::ctrlaltdel:/sbin/shutdown -t3 -r now
    # Example lines for starting a login manager
    #x:5:respawn:/usr/bin/xdm -nodaemon
    #x:5:respawn:/usr/sbin/gdm -nodaemon
    #x:5:respawn:/opt/kde/bin/kdm -nodaemon
    #x:5:respawn:/usr/bin/slim >& /dev/null
    x:5:respawn:/usr/sbin/entranced -nodaemon >& /dev/null
    # End of file
    Anyway, thanks for the interest once more

  • Event handler for STDIN input?

    Hi,
    This question will probably require a bit of context - I'm attempting to re-implement in java an application that's currently written in perl. The application is a server helper app that rewriters urls; it receives a request ID and a URL on stdin, does the necessary munging (which can require an external SOAP query), then returns the resulting rewritten URL.
    Since the results can be asynchronous due to the need for external queries to build the result, this is currently a multithreaded perl app implemented using perl's POE framework to register an event handler for stdin. That handler fires each time a line of input is received, then feeds the query to a thread pool manager (POE::Component::Pool::Thread, which is conceptually similar to the Executor frameworks). The thread returns the result as a callback registered to another function in the main thread, which then populates the query/result to a cache then outputs the result (with the original query ID) on stdout. Since stdin input and the result callbacks are event-driven, there's no while(true) main loop or other blocking mechanism in the main thread. Unfortunately, it's perl-ness is causing problems due to perl's threading implementation (three words: "copy on init"), so we need to reimplement in a language with a more robust threading implementation (preferably one with copy-on-write for shared objects). So, Java it is.
    So far everything's been good - Executor, Callables, and Futures work as I hoped they would for proper thread management, and the internal worker thread logic (XML processing, SOAP, regular expressions, etc) is proving rather simple to adapt. However, the main roadblock I'm hitting is that so far, I have not found a way to register any sort of event handler for STDIN input (or more specifically, InputStreamReader/BufferedStreamReader events). This could be due to search engine pollution - everything I see when I search for documentation on event listeners appears to be GUI-specific (buttons, menus, text areas/forms, etc). I'm just looking for a way to handle a line of STDIN, not a text area on a form.
    Any pointers in the right direction will be much appreciated!

    rekoil wrote:
    Maybe I need to rethink the design here...
    The main reason I used a callback in the original perl is that there's a large cache structure that gets checked before the thread dispatch, and only cache misses get pushed to a thread for processing. Callbacks from the threads will then add its results to the cache. Thanks to perl's thread model, when I attempted to make the cache a shared structure - in perl, you have to explicitly mark as "shared" variables that you want visible to all threads - the structure wound up getting copied to every thread, and this gave the app an unacceptable memory footprint. So the solution was to use a callback in the main thread to update the cache.
    I'm now thinking that if Java's thread model is a bit saner (i.e. a shared object doesn't get copied into every thread), then I could just have each thread update the cache, print its output to STDOUT directly, and avoid the need for the callback. I can then make my input loop simply a while() loop, waiting for the next input to dispatch. Sound sane?Yes I think so.
    There is some of this I still don't entirely understand. Your loop sounds better now but it sounds to me like the process is this.
    1) read from in
    2) call some stuff on the basis of what came in
    3) do work
    4) workers produce things
    5) things written back out
    6) read back in??
    If you're just going in/out then great. If you are going in/out/in then maybe some sort of PipedInput/Output Streams? It may well be that I got lost in your explanation in which case never mind.

  • Signal Handling by JVM : a probable bug

    I am facing the following problem. when i kill a running java code by (CTRL C SIGINT), then the sub processes created by the parent java program using "exec" call didn't get terminated. I ran the code on Solaris machine. This OS supports cascading termination meaning 'if a parent is dead then all the childs get terminated recursively". But i guess JVM calls its signal handler and didn't follow the rule of cascading termination. I THINK IT IS A BUG. can some one acknowledge/correct me on this issue

    I really don't think so.
    On unix boxes one can 'fork'. A fork creates a sub process (not a process.) Killing a sub process might or might not kill child sub processes.
    Runtime.exec() produces a process, not a sub process. So I would never expect that killing the parent would kill the other process.
    This would suggest that exiting the process would also kill the exec() process. There is a similar analog in perl. On unix it allows for fork and system/exec calls. An 'exec' terminates the perl script immediately. Using the same from the above, it would be useless since it would also immediately terminate the process just started with 'exec'.

  • JVM exit handler -  for jvm invoked thro' native C

    complicated, atleast for me :) where do I find if JVM installs any exit handlers when invoked through native C app.
    OS -> HP UX 11
    java -version ->
    java version "1.4.0.02"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0.02-021031-18:00)
    Java HotSpot(TM) Server VM (build 1.4 1.4.0.02-021031-19:15-PA_RISC2.0 PA2.0, mixed mode)
    Although jvm used is HP's hotspot, behaviour seems to be generic, so any directions are appreciated.
    In my case JNI based native shared object (on ux) is being used as a pluggin for comm with microsoft SQL2k.
    A daemon loads the pluggin (shl_load) -> transaction -> unloads (shl_unload) pluggin.
    For each tran I need to create a new JVM instance and later distroy it as it is not possible to multiple times create and distroy JVM in same process space (as encountered)
    LD_PRELOAD=.../libjvm.sl
    start the daemon( basic signals masked)
    Parent -> fork() a child process and wait for its exit status.
    Child -> Load JVM and execute reqd method
    Child -> unload JVM
    Child -> exit() the child process
    Parent ->Check the child process exit() code and carry further processing.
    Sometimes child does not exit cleanly. Even after exit() child process can be seen in process table and parent wait()'s idefinetly for child exit code.
    gdb ouput of child preocess
    #0 0xdd28ca38 in os::report_fatal_error () from /opt/java1.4/jre/lib/PA_RISC2.0/server/libjvm.sl
    #1 0xdd28dc48 in os::handle_unexpected_exception ()
    from /opt/java1.4/jre/lib/PA_RISC2.0/server/libjvm.sl
    #2 0xdd296c50 in os::Hpux::JVM_handle_hpux_signal ()
    from /opt/java1.4/jre/lib/PA_RISC2.0/server/libjvm.sl
    #3 0xdd293adc in os::Hpux::signalHandler ()
    from /opt/java1.4/jre/lib/PA_RISC2.0/server/libjvm.sl
    #4 <signal handler called>
    #5 0x7e5e6134 in ?? ()
    #6 0xc03c6fbc in __niamHelper () from /usr/lib/libCsup.2
    Can any one tell me what exactly is happening ?
    If I call [b]_exit() instead of exit() everything works fine.

    Thnx a lot,
         Finally I was able to locate atexit()'ed function which was causing the problem (setting br at exit() was not working, execution straightway stopped at #0)
    (gdb) thr 1
    [Switching to thread 1 (system thread 17555)]
    (gdb) bt
    #0 0x7e6224e0 in epc_exit_handler () from /citisafe/users/yogiraj/cs35/dll/ora_tcp.sl
    #1 0xc03c6fbc in __niamHelper () from /usr/lib/libCsup.2
    #2 0xc03c7110 in niambody () from /usr/lib/libCsup.2
    #3 0xc03c721c in _niam () from /usr/lib/libCsup.2
    #4 0xc016fe20 in exit () from /usr/lib/libc.2
    #5 0xc4f0c364 in sql_exec_custStrProc () from /citisafe/users/yogiraj/cs35/lib/libtcsql.sl
    #6 0x7ec0c9f4 in exec_ext_mgmt (p_ExtCredentials=0x7edf2878)
    at /citisafe/users/yogiraj/cs35/c/sql_app.c:251
    #7 0x9620 in adm_process_rec ()
    #8 0x8bc8 in process_pwd_requests ()
    #9 0x8684 in adm_do_ext_sync ()
    #10 0x7f5c in main ()
    Oracle client lib was the culprit.     Daemon is basically a 'C' daemon which loads pluggins for communication with various DB's including Oracle, Sybase, MS SQL etc and later unloads them on completion.
    Ora lib libclntsh.sl installed "epc_exit_handler", eventhough we had shl_unload()'ed oracle pluggin earlier the handler refrence was still around. Later when process exit()'ed may be static dealloaction mech panicked.
    Above exit() handler execution even after unloading of Oracle libs seems to be a known bug and work around suggested is to LD_PRELOAD=%ORALIB/libclntsh.sl. After LD_PRELOAD'ing exit() works fine.

  • Unix Signal Handling in Oracle Apps

    I have a number of questions regarding Signal Handling
    on Unix platforms within Oracle client code. I would like
    to ensure that my signal handling requirements do not clash with
    those of Oracle within an application.
    1. Does the Database client code register any Unix signal
    handling routines within a user application?
    2. If it does, which signals does it handle?
    3. What is the scope of these handler routines, i.e. when are
    they registered and when do
    they become de-registered?
    4. When registered, do these handler routines attempt to pass
    signals on to previously registered
    handlers (i.e. do previously registered handlers get chained)?
    5. When they are de-registered do they attempt to re-instate any
    previously registered signal handlers?
    thank you in advance for your help,
    John Tresadern
    IBM UK.
    null

    This can certainly be done, assuming you have sufficient hardware/storage resources.
    Each instance will need to have a separate Unix account (e.g. applvis, appldev etc).
    The actual details of the cloning process are outlined in MOS Doc 230672.1 (Cloning Oracle Applications Release 11i with Rapid Clone)
    HTH
    Srini

  • OCCI & Signal Handling

    Hello,
    Before calling any OCCI function my signal handling (ie for SIGTERM) works, however, after calling OCCI environment/connection my signal handling no longer works. I believe the OCCI version is 9.2.0.6.0. Does anyone have an example of using signals with OCCI? It seems OCCI is 'stealing' my signals! Below is the basic test program.
    Thankyou in advance!
    Ross.
    The problem area: (c++)
    oracle::occi::Environment *env;
    oracle::occi::Connection *conn;
    oracle::occi::Statement *stmt;
    oracle::occi::ResultSet *rset;
    ::signal(SIGINT, signal_handle);
    ::signal(SIGTERM, signal_handle);
    ::signal(SIGPIPE, sigpipe_handle);
    cout << "Attempting to connect to server" << endl;
    try
    env = oracle::occi::Environment::createEnvironment (oracle::occi::Environment::DEFAULT);
    conn = env->createConnection ("usr", "pswd", "db");
    cout << "Connection Estabolished OK" << endl;
    string sqlStmt = "SELECT I_STATUS FROM K_INC";
    stmt = conn->createStatement (sqlStmt);
    rset = stmt->executeQuery ();
    while (rset->next ())
    cout << "Result!" << rset->getString(1) << endl;
    stmt->closeResultSet (rset);
    conn->terminateStatement (stmt);
    catch(oracle::occi::SQLException ex)
    cout<<"Exception thrown for displayAllRows"<<endl;
    cout<<"Error number: "<< ex.getErrorCode() << endl;
    cout<<ex.getMessage() << endl;
    cout << "We have a problem!" << endl;
    }

    hi Ross,
    I think there is no problem of signal stealing . I am able to use the signal handling before the connection, after the connection and even after insertion of rows into the table.
    I implicitly raised a signal in all the above three cases and also explicitly from another process using kill -15 <process ID >, and the signal handler seems to work fine.
    the code is attached below , see if it helps.
    thanks
    varun
    #include <iostream>
    #include <occi.h>
    #include<csignal>
    using namespace oracle::occi;
    using namespace std;
    int i=1;
    class occidml
    private:
    Environment *env;
    Connection *conn;
    Statement *stmt;
    public:
    occidml (string user, string passwd, string db)
    env = Environment::createEnvironment (Environment::DEFAULT);
    conn = env->createConnection (user, passwd, db);
    ~occidml ()
    env->terminateConnection (conn);
    Environment::terminateEnvironment (env);
    * Inserting a row into the table.
    void insertRow ()
    string sqlStmt = "INSERT INTO varun VALUES (111, 'ASHOK')";
    stmt = conn->createStatement (sqlStmt);
    try{
    stmt->executeUpdate ();
    cout << "insert - Success" << endl;
    }catch(SQLException ex)
    cout<<"Exception thrown for insertRow"<<endl;
    cout<<"Error number: "<< ex.getErrorCode() << endl;
    cout<<ex.getMessage() << endl;
    conn->terminateStatement (stmt);
    void term(int sig)
    cout << "handling signal no." << sig << endl;
    i=i+1;
    int main (void)
    string user = "SCOTT";
    string passwd = "TIGER";
    string db = "";
    signal(SIGTERM,term); // register a SIGTERM handler
    while(i==1){}
    printf("Before Connection\n");
    occidml *demo = new occidml (user, passwd, db);
    while (i==2){}
    printf("After Connection\n");
    cout << "Inserting a record into the table author_tab " <<endl;
    demo->insertRow ();
    while(i==3){}
    delete(demo);
    printf("Complete");
    }

  • JVM Signal Handling on NT and HP-Unix

    Hi
    I'm trying to catch various JVM shutdown signals in my application so that the application can do some clean-up before shutting down. Here is the code that i've written...
    sun.misc.SignalHandler jvmSignalHandler = new sun.misc.SignalHandler()
    public void handle(sun.misc.Signal sig)
    // Do some cleanup
    // Call handler on interrupt signal (CTRL-C)
    sun.misc.Signal.handle(new sun.misc.Signal("INT"), jvmSignalHandler);
    // Call handler on terminate signal
    sun.misc.Signal.handle(new sun.misc.Signal("TERM"), jvmSignalHandler);
    // Call handler on abort signal
    sun.misc.Signal.handle(new sun.misc.Signal("ABRT"), jvmSignalHandler);
    If i run this process on NT in a dos box, the applicatin behaves fine by responding to all these signals...
    e.g. If i press CTRL-C (INT), or i close the dos box (TERM), or i shutdown NT (ABRT).
    However on UP-Unix, i tried kill -2 (TERM), kill -6 (ABRT) and kill -15 (INT)... Out of these, only kill -6 (ABRT) works, while the others just "kill" the application and there is no clean-up. Can anyone help if i need to use any other codes on HP-Unix, or do i need to catch any other signals in my application.
    Thanks in advance
    Regards
    Kashif

    Hope the following info(from HP-UX $man kill) is useful to you.
    Signal Names and Numbers
    The following table describes a few of the more common signals that
    can be useful from a terminal. For a complete list and a full
    description, see the header file <signal.h> and the manual entry
    signal(5).
    signum signame Name Description
    0 SIGNULL Null Check access to pid
    1 SIGHUP Hangup Terminate; can be trapped
    2 SIGINT Interrupt Terminate; can be trapped
    3 SIGQUIT Quit Terminate with core dump; can be trapped
    9 SIGKILL Kill Forced termination; cannot be trapped
    15 SIGTERM Terminate Terminate; can be trapped
    24 SIGSTOP Stop Pause the process; cannot be trapped
    25 SIGTSTP Terminal stop Pause the process; can be trapped
    26 SIGCONT Continue Run a stopped process
    BTW, do you have JavaDoc for sun.misc.Signal class in hand? I havn't. I'm not sure the name-rule for signals between HP-UX and Windows is same or not.

  • Signal handler in Tuxedo

    Hi,
    We are using Tuxedo 8.0 in our application.
    Our servers are crashing due to some code in our app...
    We want to use C signal handler to trap this signals to trace the code, before crashing. This way we can easily fix the code.
    But for some reason when I use signal, its not catching SIGBUS. I also used Usignal, but still to no success...
    Please suggest...
    Thanks
    Rama

    Hi,
    I have not encountered any problem with signal trapping with Tuxedo 6.5 and 8.1, i have not worked on 8.0. May i know how you are using signals in your service. In our case we are using as --
    service A()
    signal(SIGBUS , SigCatcher) ;
    signal(SIGSEGV , SigCatcher) ;
    signal(SIGINT , SigCatcher) ;
    signal(SIGTERM , SigCatcher) ;
    signal(SIGQUIT , SigCatcher) ;
    signal(_SIGKILL , SigCatcher) ;
    int SigCatcher(int signo)
    /* CODE to Handle signal *****************/
    Regds
    -Ashish

  • Signal Handling

    Friends,
    The scenario is such that, a server is running on several ports satisfying multiple clients on each of the port.
    The requirement is that the server must catch signals like killing of the server or restarting of the server.
    Will I code the signal handler by adding a shutdown hook to the Java runtime, using the
    Runtime.getRunTime ().addShutdownHook method.
    If I kill the process by kill -9 option will it serve the purpose.
    Please give a reply its urgent

    Hi ....
    Actually is there any class in java for Signal Handling which can handle the following signals :
    SIGCHLD
    SIGHUP
    SIGTERM
    SIGINT
    SIGBUS
    SIGSEGV
    SIGPIPE
    I would run the program in Suse Linux Environment.... If I want to avoid JNI code ..... then what is the other option ......
    Please reply....

  • Signal Handling on Alpha machines

    Could any one of you tell me how to trap 'Ctl-C' on Alpha machines or OSF1 OS ? The following piece of code works fine on Linux and Solaris bt not on alphas ?
    I know sun.misc.* is not not guranteed to work on all platforms but wanted to see if any of you ran into this problem and has a solution?
    Thanks
    Sreenath
    import sun.misc.Signal;
    import sun.misc.SignalHandler;
    public class InterruptSignalHandler implements SignalHandler {
    public static boolean USER_INTERRUPTION = false;
    private String SIG_INT = "INT";
    private String SIG_TERM = "TERM";
    private Signal intSignal = null;
    private Signal termSignal = null;
    public InterruptSignalHandler() {
    public void install() {
    intSignal = new Signal(SIG_INT);
    termSignal = new Signal(SIG_TERM);
    Signal.handle(intSignal, this);
    Signal.handle(termSignal, this);
    * The <code>handle</code> method here.
    * @param sig a <code>Signal</code> value
    public void handle(Signal sig) {
    System.out.println("Tried to kill me...");
    if (USER_INTERRUPTION == false) {
    USER_INTERRUPTION = true;
    System.out.println("I am interrupted.."+USER_INTERRUPTION);
    * The <code>main</code> method here.
    * @param args[] a <code>String</code> value
    public static void main(String args[]) {
    System.out.println("Try to destroy me by pressing CTRL-C");
    InterruptSignalHandler intSigHandler = new InterruptSignalHandler();
    intSigHandler.install();
    // Start infinite loop
    for (;;){
    System.out.print(".");
    }

    Wasn't it enough to simply reply to your other (duplicate) question you posted yesterday??? Does my answer have no relevancy whatsoever???
    http://forum.java.sun.com/thread.jsp?thread=511180&forum=31&message=2429068

  • 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;
    }

  • 64-bit AIX 5.2 for weblogic 8.1 SP2

    Hi,
    I am looking for the environment for webLogic 8.1 SP2 Installation on AIX 5.2.
    Can it run on 64 bit OS? Can it run with IBM JDK 1.4.1 32 bit/64bit/both?
    If it does run, is it supported by BEA?
    Thanks,
    Nicholas

    Hello
    Soh Woon Peng <[email protected]> writes:
    I'm running Apache 2.0.49 and Weblogic Server 8.1 SP2
    I could not connect Apache (port 80) to Weblogic server (port 7001).
    I had deploy sample /SECURITY application to port 7001
    I can access http://haelis01:7001/security but cannot access http://haelis01:80/security
    I had done the following steps
    a) copy mod_wl_20.so to $apache/modules
    In httpd.conf
    b) LoadModule weblogic_module modules/mod_wl_20.so
    c) <IfModule mod_weblogic.c>
    WebLogicHost haelis01
    WebLogicPort 7001
    </IfModule>
    Does anyone come across this problemYou should had the weblogic-handler for the /security location:
    <Location /security>
    SetHandler weblogic-handler
    </Location>
    >
    Thank you--
    Aurélien DEHAY http://logicielslibres.info
    Passer pour un idiot aux yeux d'un imbécile est une volupté de fin
    gourmet. (Georges Courteline)

  • Section/Template Handles for Sakai Integration

    Hello,
    I am working with Shepherd University's Learning Management System, the open-source Sakai, and trying to integrate it with our iTunesU account. There is already a tool (albeit a bit older and possibly out of date, I'm not sure) for Sakai that is to integrate with iTunesU, but there are a couple credentials and variables I don't have off-hand. I know, from our account information, the shared secret, the different credentials for Administrator, etc. But, my problem comes in needing a section handle for the location to have the sites inserted, and a template handle for the system to follow in creating new pages on iTunesU. Though we have an iTunesU account, it is rather new and we haven't used it much, so we are not very familiar with the system.
    I've seen that I could get the handles for the sections and pages using a ShowTree command, but the process to get to that is rather long for one single inquiry, and thus far I'm having much trouble in getting that to work. Also, I'm not sure if this will get me the handles for any templates I have set-up. Is there any easier or better way just to get this basic information? Thus far I do not even know the handle, offhand, for the top-level of our account's site, much less any of the sections or tracks underneath it. Any help would be much appreciated!
    Regards,
    Adin J. Ray

    please check:
    SAP Note Number: 923359
    Terminology has been changed as of SAP NetWeaver 7.0 (2004s) Support Package Stack 6:
    The configuration wizard was called "Template Installer" and is sometimes refered to as "Central Technical Configuration" or "CTC".
    The configuration tasks, which are selected and started from a list in the configuration wizard, were formerly called "templates".

Maybe you are looking for

  • H8-1520t: sfc /scannow reported file corruption in Windows 8.1

    My computer (h8-1520t) computer had had file corruption error reported by sfc /scannow. The corruption was rather common corruption as discovered elsewhere on the internet.  The corruption pertained to prncacla.inf and it was repaired only by using D

  • Hiding Pages in ADOBE form using formcalc scripting.

    Hi Experts, I am new to ADOBE form and currently working on invoice print output. (NOT an  Interactive adobe form) My requirement is i wanted to print one main page and 5  different annexures(anexures are having different layouts so is in diff forms

  • Java interaction with websites?

    Hey, I'm been learning java for a few months now, and know the basics well, I have written a few small programs, including one which transfers songs from iPod to computer. I need some advice on where to start on my next project. Basically I want to m

  • Basis work for SAP system copy using DB2 cloning tool

    My company is using the DB2 cloning tool, formerly from MainStar. Our DBAs have used this tool to create a clone of a technical sandbox (ST1) to another DB2 instance (SZ1). I am reading through the System Copy for SAP Systems Based on SAP NetWeaver 2

  • Can I just drag/drop files to the TC to back them up ?

    As it appears to be 'just' a hard drive, can I simply drag/drop any files I want to back up immediately, onto the TC and they will copy across ? Will this not affect the backup images ?