f



Signal Problem

Something strange is happening. I'm using a signal handler to control
exception in a C program.
For some reasons when an MCH3601 message is signaled, the exception
handler is correctly called but the program still crash as the exception
was ignored with "CEE9901 Application error.  MCH3601 unmonitored by...".
I tried to force other errors, as MCH3401 that raise the same SIGSEGV
signal, and the program just run fine.
This is the sample program, the pointer passed to setsppfp function 
doen't point tu anything so an MCH3601 is raised by setsppfp function, 
so the output is:

sig = 5, excp_data = MCH3601
sig = 5, errno= 3408

then CEE9901 occurs: "Application error.  MCH3601 unmonitored by...".

#include <pointer.h>
#include <except.h>
#include <QSYSINC/MIH/SETSPPFP>
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <signal.h>
#include <sys/signal.h>
void my_signal_handler(int sig) {
   _INTRPT_Hndlr_Parms_T excp_data;
     _GetExcData(&excp_data);
     printf("sig = %d, excp_data = %7.7s\n", sig, excp_data.Msg_Id);
     errno = EFAULT;
     printf("sig = %d, errno= %d\n", sig, errno);
     return;
}
void main(void) {
  _SYSPTR spn;
  _SPCPTR spp;
  errno = 0;
  signal(SIGABRT, SIG_IGN);
  if ((signal(SIGSEGV, &my_signal_handler)) == SIG_ERR) {
    printf("signal err = %d:%s\n", errno, strerror(errno));
  } else {
    spp = setsppfp(spn);
    printf("spp errno =%d: %s\n", errno, strerror(errno));
  }
}

If I put the line:
   signal(SIGSEGV, &my_signal_handler);
just before the return in my_signal_handler function, the program did'nt 
crash and the output was:

sig = 5, excp_data = MCH3601
sig = 5, errno= 3408
sig = 5, excp_data = MCH3601
sig = 5, errno= 3408
spp errno =3408: The address for an argument was invalid.

So the question is why I have to register twice my_signal_handler function?



-- 
Dr.Ugo Gagliardelli,Modena,ItalyCertifiedUindoscrasherA�ejoAlcoolInside
Spaccamaroni andate a cagare/Spammers not welcome/Spammers v�o � merda
Spamers iros a la mierda/Spamers allez vous faire foutre/Spammers loop
schijten/Spammers macht Euch vom Acker/Spamerzy wypierdalac'

0
info1229 (187)
5/15/2006 6:24:09 AM
comp.sys.ibm.as400.misc 9219 articles. 3 followers. Post Follow

0 Replies
642 Views

Similar Articles

[PageSpeed] 47

Reply:

Similar Artilces:

Newer IBM MOUSE.SYS has problems with serial mice
While installing eCS 1.2 just yesterday (21 Feb), I found an odd problem with my serial mouse. Basically, everything worked fine except the buttons. These were ignored when using the Desktop or a subsidiary window. Opening a full screen VDOS, Win-3.1 or OS/2 window cured the bug. Mensys in *.nl agreed this was weird but said they'd heard of it before: IBM made a cods-up of the newer MOUSE.SYS and broke the support for serial mice; it seems too many people have gone over to PS/2 mice and their testing has gone lame. (IBM keep control of the source code, one learns, so only an idiot could blame this on the eCS folks.) The best fix Mensys can offer, lacking a rush of code-fixing keenness by IBM, is to see something gets done for the next installer refresh, to install the appropriate version of MOUSE.SYS. The fix in my case was to copy the MOUSE.SYS from CD:\ECS\BOOT to OS:\OS2\BOOT then reboot. All is happy now. I must say eCS, at version 1.2, is starting to leave Warp 4.52 in the dust with its general improvements. (Many are non-obvious.) And the new installer continues to be a great help. -- Andrew Stephenson Andrew Stephenson schrieb: > > While installing eCS 1.2 just yesterday (21 Feb), I found an odd > problem with my serial mouse. Basically, everything worked fine > except the buttons. These were ignored when using the Desktop or > a subsidiary window. Opening a full screen VDOS, Win-3.1 or OS/2 > window cured the bug. > ...

problem with reload(sys) (doing reload on the sys module)
Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. **************************************************************** Personal firewall software may warn about the connection IDLE makes to its subprocess using this computer's internal loopback interface. This connection is not visible on any external interface and no data is sent to or received from the Internet. **************************************************************** IDLE 1.1.2 >&g...

Printing on AS400 via IBM AS400 Java Toolkit
Hello all, I'm working on a program that needs to send a print job to a printer connected to an AS/400. I've tried using the SpooledFileOutputStream and I've also tried using one of the SCS Writer classes. Neither solution is working. With the SpooledFileOutputStream I am at least able to create my print file, but when my program ends, the file is still not being printed. This program does not run on the AS400, it runs on a PC and connects to the AS400 via the toolkit classes. I know this part works as I am able to use the toolkit to access Data Queues, Files and Data Areas without a problem. Is there anyplace anyone can point me to see some examples of how to print a file using the AS400 Java Toolkit? Thanks in advance, Chuck Chuck, What printer data stream is used? or how was the printer data generated? I am wondering if the data stream being generated matches the data stream of the printer connected to the iSeries? What printer is attached to the iSeries and how is it configured? The iSeries info center has some Toolbox examples: Programming>Java>IBM Toolbox for Java>IBM Toolbox for Java Classes> Access Classes>Print>Creating... Dave Chuck wrote: > Hello all, > > I'm working on a program that needs to send a print job to a printer > connected to an AS/400. I've tried using the SpooledFileOutputStream > and I've also tried using one of the SCS Writer classes. Neither > solution is working. With the Sp...

Problems problems....
I've got Fujitsu MAN3184MP and Adaptec 29160 scsi card. Sometimes i have this message "A disk read error occured" , sometimes even bios does not recognize it, sometimes it does but the boot sequence does not start it seems that motherboard bios has problems with it ( so it seems to me, i could be wrong about that assumption) . Then i reset and it all works perfectly. I've noticed a speed degradation in Win XP lately. I'm angry :)) I have LVD/SE terminator, and i think 68pin cable ( not sure about that ). Hope i gave you enough info to try and help. Thanx! -- ----------------------------------- Makni #### iz adrese Seems obvious that the drive is going belly up. You could download the manufacture's utility disk and confirm it. I think time would more wisely be spent backing up your data before you can't read it at all. DaveL "biBU" <idolovcak####@inet.hr> wrote in message news:cuslus$ljq$1@fegnews.vip.hr... > I've got Fujitsu MAN3184MP and Adaptec 29160 scsi card. > > Sometimes i have this message "A disk read error occured" , sometimes even > bios does not recognize it, sometimes it does but the boot sequence does > not start it seems that motherboard bios has problems with it ( so it > seems to me, i could be wrong about that assumption) . Then i reset and it > all works perfectly. I've noticed a speed degradation in Win XP lately. > I'm angry :)) > > ...

Signal problem
Hello again! Full of problems today! This one is about signal treatment. I made a daemon and set it to treat 2 signals: SIGALRM and SIGTERM. It goes like this: signal.signal(signal.SIGTERM, daemon.signalHandler) signal.signal(signal.SIGALRM, aFilter.alarmHandler) On daemon.py I have: " .... terminate =3D False def signalHandler(signum, frame): terminate =3D True .... " And my main loop goes like this: 'while(not daemon.terminate):' When the signal treatment was in the same file as my loop it worked just fine, and since I've separated...

Signals problem
OK OK guys. I have arranged that by any exception not swallowed by __try { } __except a default signal handler will be called called __defaulttrap I have now arranged the code so that it looks like this: -------------------------------------------------------------- #include <windows.h> #include <stdio.h> #include <signal.h> /* When a trap occurs, the recovery code arranges that the exception record will be in this variable */ extern EXCEPTION_RECORD _ExceptionRecord; static void CallSignalHandler(void (*fnptr)(int),int sig) { // Should ve just ignore the signal? if (f...

IBM AS400
Does anyone have some notes, documentation or helful pointers about navigating, command language and DB2 on an AS400 for a guy who has done HP3000, Windows 2k/2k3, MS SQL, HP9000, IBM ES9000/UNIX, SCO UNIX? Ideally a commands cross reference qaulivalent would be terrific - I.E. HP3000 to AS400. Thanks much. P.S. I'm taking a role in a shop that runs its ERP system on this platform. Jim. ____________________________________________________________________________________ Get easy, one-click access to your favorites. Make Yahoo! your homepage. http://www.y...

Problem with signals
Hello, i ahev a problem with a multithread server, and i don't know if there is a problem with signal or conditions, i will try to explaim my problem. I listen at two port connections, one for a gateway protocol, and the other wait connections from serial converters via txp. When a serial converter connect a thread are created to manage the serial protocol, and it's stoped waiting for a condition, when i recibe a command in the gateway thread i wake up the condition to notify to the other thread that need start the work, and wait other condition to check for work completion, it works fine. But when i turnoff the serial converter, and i send the gateway command, i wake up the condition, ans wait for completion but the timeout reaches becouse the work are not done, its fine. Now i turn on again the serial converter, other tcp connection are made, and a new thread are started, and are waiting to start job. Now if i send the gateway command it wakeup the both threads, and i get the work done, but if i send again the command the old broken thread recives a SIGPIPE (i trap it to ensure that don't stop the program), the file descriptior are closed, but now i get timeout waiting for the job. I put debug sentences, and see that after recibe the SIGPIPE the new thread newer wakeup, upon i send a condition_boardcast, and before the SIGPIPE i can wake it up. I need to make a special signal handlig to deal with this? R...

signal problem
This is a multi-part message in MIME format. ------=_NextPart_000_000A_01C35B82.AB6142E0 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: quoted-printable Hi,=20 I have a cod as following : .... my $stop =3D 0; sub my_sigint_catcher { $stop =3D 1; }; $SIG{'INT'} =3D 'my_sigint_catcher'; while (1) { ....=20 system("ANOTHER PERL SCRIPT"); ... last if ($stop); } exit 0; Here is my question: 1. The system(" ... ") has its own $SIC{'INT'} handler. Therefore, = when I do ctrl-c during this period, the ...

Re: Re: Python 2.3.3 signals, threads & extensions: signal handling problem[Resolved]
Stupid me: This is what I found in the script code: print '*** Note: you need to kill this with SIGKILL ***' Testing the code again I see the same behaviour for python 1.5.2 and pyth= on 2.3.3 (the signal handler, installed in the main thread, not getting the signal= s *most of the time*). Seems like it was one of those days the other time. Thank you to Andrew and fishboy. Cheers Holger Der Inhalt dieser E-Mail ist vertraulich. Falls Sie nicht der angegebene Empf=E4nger sind oder falls diese E-Mail irrt=FCmlich an Sie adressiert w= urde, verst=E4ndigen Sie bitte den Absender sofort...

signal problem #2
I have Bernoulli Binary Generator (it is NRZ and i need RZ, and with 10 samples per frame). How can i plot the signal in time (the problem is that the time vector and signal vector are in different size). The 0 and 1 the Bernoulli generates . 1. How to plot output from the generator? 2. is it possible to extand the signal? 3. How to make disperzion (need this one for modulation)? I am Matlab begginer....please explain everything clearly like for a total amateur person Thanks ...

basic signal problem
Dear All, I have a problem in signals. #include <signal.h> main() { printf("\n use DEL for exiting"); for(;;); } when the DEL key is pressed, the kernel sends SIGINT signal to process. my problems are: 1. here in the above program, the first printf statement doesnt get displayed at all. 2. and if i press the DEL key, it doesnt terminate. only if i press the "CTRL \" or "CTRL Z" does it terminate. another program code --------------------- #include <signal.h> void abc(); main() { printf("\n press <del> key\n"); ...

Signal Handling problems
hello everyone, I have been programming an init program based on the existing init programs. I am facing some problems with the signal handling mechanisms. I have a few signals setup to be handled by the program. If i execute the program in userspace [simulation-mode], all the signals are being handled fine, but when i execute the same code as the init program, whenever i send a signal the Kernel panics and crashes the machine. This occurs for all the signals that are setup to be handled by the program. This is on a 2.6.4 kernel on Mandrake 10. Is there anything spl that needs to be d...

Problems with capaturing signal
Dear all, I bought a model and my amplifer is injecting a pure sinewave of current source of 2A. I measure the current though a resistor shunt and at my labview model i use a divider to divide by the resistor value to get back my current in graphs.However i realise i need to press run button of labview at the same time with my start button of amplifer if not labview will not capture.can some 1 pls advise me on how to fully capture my waveform?My waveform is only 0.1seconds. I have attached my model.Pls advse me of any thing to be ammended in my circuit.cheersShawn current.1vi.vi: http://forums.ni.com/attachments/ni/170/345542/1/current.1vi.vi Hi, Here's a quick and simple approach attached to get you further with your program. You can add your calculations and such on your own. I replaced waveform graph with a waveform chart, so now you can start your program first and your amplifier afterwards. You can adjust the size of the chart history by right-clicking on the chart and selecting Chart history length. Hope this helps! - Matti current.vi: http://forums.ni.com/attachments/ni/170/345574/1/current.vi Dear Matti, thankyou for ur advise.i cant see the chart history.when i open up the chart history lenght it just show the buffer size.how do i see the point when my signal is being trigger? Buffer size = history length = data&nbsp;points on the graph . Add X Scrollbar by right-clicking on the chart (Visible items-&gt;X Scrollbar) or use Autoscale X. Of course yo...

SIGCHLD signal problem
How can I ensure that my program generate SIGCHLD signal only in case child process terminate .(not in case when child process stop). Is there any other way to deal with this problem. TIA niraj On 29 Jun 2005 05:00:09 -0700, niraj.kumar.ait@gmail.com wrote: >How can I ensure that my program generate SIGCHLD signal only in case >child process terminate .(not in case when child process stop). Is >there any other way to deal with this problem. man sigaction Look at SA_NOCLDSTOP. Cheers, Michael can i block stop signal(dont want to catch stop child process) without using siga...

Signal detection problem
Hello It is Required to continuously monitor, the received signal from a sensor and detect the presence of the pulse. The amplitude of the pulse remains constant. After A/D conversion, we were trying to pass the discrete time signal through a Long Time Analysis(LTA) Filter and Short Time Analysis(STA) Filter and compare their outputs to detect the pulse (start and end points of the pulse). It is required to know these points as precisely as possible. The SNR of the signal is 5 dB. I am unable to decide on the filter - type,order, time constant. Please comment,tell me if there is a falla...

A signal conversion problem
Hi everyone, I am using the Embedded Target for Motorola MPC555 toolbox (R13SP1). I would like to input an analog signal and convert it to binary and output the digital signal. So I have created a simple model which consists of a "QADC Analog Input", "Integer to Bit Converter" and a "MIOS Digital Output". However, I have an error when building the model. The error message: Error executing build command: Error using ==> make_rtw Error using ==> tlc_c Error using ==> rtwgen --> Data type mismatch. Output port 1 of block 'newtest/QADC Analog In/Non-...

Signalling Channel Problem
dear helper we are using passport 6440 with E1 MVPe cards, four of our sites are working fine but two of the sites are giving problem in D-channel, despite of our all efforts D-channel is still out of service. we have got the tracing logs which are showing that D-channel become out of service because it did not get the acknowldgement of all interface reset request from siemens ewsd switch. we are not getting any alarms in d lp/* e1/*, its mean that E1 link is up. We are using Euro isdn signalling. we are using software BG00SAB best regards "Rehman Gul" <gulgee@ya...

Win2000 problems on IBMs
I'm with a PC refurbishing company, and recently we upgraded our licensing to win2000 on all our refurbished PCs. We have an imaging station set up: An XP DHCP server connected to 6 PCs booting to a reprogrammed NIC in Norton Ghost. We've had no problems with other models of PCs (hp, compaq, dell, generic...) until we began on our batch of IBMs. Using 98 is no longer an option. It does not matter the size of the HDD we're using, Ghost isn't making an image that will boot in an IBM. Our last ditch is to install 2000 by CD and try to image that. However the last time that...

signal problems on win32
I have a simple program that reads from a socket, compresses the data and writes it to a file. Because I'm using zlib, I must intercept SIGINT so I can close the GzipWriter before exiting or the file will be corrupted. Problem is, sometimes my handler gets called, and sometimes it doesn't. When it doesn't, the program just hangs and I have to kill the process from task manager. This is with ruby 1.8.2 (2004-07-29) [i386-mswin32] on Windows XP. If I perform some additional manipulation of the data before compressing it (as shown in the commented lines in the loop), the problem ...

Problems with IBM Netvista
Having problems with my computer. When turned on it starts to load windows xp home edition then clicks off and comes back with a screen that says sorry for the inconvenience but windows did not load....then gives different options to load with 'start windows normally' highlighted. It then loads windows o.k. but will also sometimes freeze on the windows screen. I had it in for servicing and the computer tech replaced the hard drive along with the motherboard saying that the hard drive was at fault but it is still doing the same thing. I checked the Event Viewer log and th...

Problem with updating Signals
Hi everyone, i have a problem with anSimulink model, which i use ti control a robot via Control Desk. It is: I want to switch signals, so i use a switch block with control input. Tis control input depends on a signal i can change online, during runtime, in Control Desk. Lets call this Signal "dec". Now dec is the output of an Block. If the Input Signal of this Block is zero (lets call it "dec2")Signal dec is zero, otherwise its 1. Now, when i start simulation, dec is 0, cause i initialitzed dec2 to zero. While increasing dec2 now, dec becomes 1. The Problem is, that when...

S36-AS400 problem
Was doing some snooping on archived posts from the midrange group. Came up with this thread relating to a problem some of my clients are having. Did anyone ever get the appropriate PTF reference? The thread ends without giving the reference.One client is on V3R7, the rest are on V4R3 Brian Jerome Draper wrote:>> Anybody come up with the mentioned PTF reference.>> My S36 program prints one spool item for each PO (why? who knows?). When I> print them to P4, a S36 printer on stop, they all end up in the S36 spool as> completed reports. When I print them to P9, a "mapped" S36 printer, they> whoosh to the "mapped" outq on the AS400. Interesting is that the first> whatever number of PO's get stuck in "OPN" status and the last and final PO> always prints fine. The "OPN" PO's are stuck at 0 pages forever. The> workaround is to print them to P4 and then do a CHANGE ID,P9,P4 to whoosh> them to the outq on the AS400 side where the print perfectly.>> Jerry> what is the ptf level on the box? both os/400 and ssp levels. joe leblanc www.michsoft.com The 36 box is DK7517. How do I find the level on OS400? I went to GO PTF and chose to Display ptf but just get all the individual ptf's. Brian "JHL" <jhl@michsoft.com> wrote in message news:1123296668.571962.38040@o13g2000cwo.googlegroups.com... > what is the ptf level on the box? both os/400 and ssp...

Problems with pinging an as400
When i ping my production as400 using the ip address i get instantly a response. When i ping it with a name , it takes up to 1 min before the ip address is found. The hostname is in the host table with the correct ip address. I tought that when pinging using a hostname the as400 will immed look into this table to get the ip address. Am i overlooking something ? Rikkie Rikkie wrote: > When i ping my production as400 using the ip address i get instantly a > response. > When i ping it with a name , it takes up to 1 min before the ip address is > found. > The hostname is in the host table with the correct ip address. > I tought that when pinging using a hostname the as400 will immed look into > this table to get the ip address. Am i overlooking something ? From what machine are you doing the pinging? Is it from the AS/400 itself? If so, then you may have a problem. However, if you're pinging from some other machine, e.g. your PC, then the DNS in your network may be having a problem. Hi Look at the CFGTCP option 12. Is the right DNS server ip adres configured. And also look at the DNS lookup parameter (*local/remote). Bullsniper "Rikkie" <everslegers@web.de> schreef in bericht news:3fce3430$0$3251$ba620e4c@reader0.news.skynet.be... > When i ping my production as400 using the ip address i get instantly a > response. > When i ping it with a name , it takes up to 1 min before the ip address is > found. > The ho...

Web resources about - Signal Problem - comp.sys.ibm.as400.misc

Problem novel - Wikipedia, the free encyclopedia
Working class, or proletarian novels are often also social problem novels . This was in many ways a reaction to rapid industrialization , and ...

INNOVATION INSIGHTS: How this Australian startup is trying to solve a problem for millions every day ...
If you’ve ever found yourself desperately trying to find city parking, you’re not alone. The problem of sourcing parking, especially in central ...


Brussels terror attacks are Europe's problem, not just Belgium's
Belgium's security forces could have done more to prevent the Brussels attacks, but so could every security service in the world.

No Law Degree? No Problem! Sarah Palin To Preside Over Reality TV Court
Sarah Palin will tell you about a crazy legal theory called rootin’-tootin’ res ipsa loquitur.

Martin Sorrell to 4A's Gathering: 'There Is A Problem' With Gender, Diversity
... J. Walter Thompson's former CEO Gustavo Martinez resigned for alleged sexist and racist remarks, WPP CEO Martin Sorrell said "there is a problem" ...

Apple Has Problems with Its Cloud Infrastructure, Says The Information
... ) Google division for some cloud computing infrastructure, The Information ’s Amir Efrati and Steve Nellis today write that Apple has a problem ...

The world’s wealthiest failed state... a population that’s complicit.... a very strong implantation ...
... its success in arresting [the alleged leader of the Paris massacre Salah] Abdeslam, Belgium continues to present a special security problem ...

Obama: Climate Change Is a 'Major' Problem, But ISIS? 'They're Not An Existential Threat'
... on Wednesday. "They're not an existential threat to us," he said. But a few sentences later, he described climate change as a "major" problem. ...

Arizona's voting problems highlight significance of Supreme Court nomination fight
The lines were so long at some voting sites during Arizona's primary Tuesday that people started ordering pizza while they waited. Budget cuts ...

Resources last updated: 3/24/2016 1:34:51 PM